diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-12 09:55:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2014-11-12 11:03:29 +0000 |
commit | bb437029c1e5331bcc3f8fb2fc87837142a52f33 (patch) | |
tree | 56bde4059792a5284e90ae3b10ee4388cc913a54 /connectivity/qa | |
parent | 84f7f412bfc9e18b1ff8b133ceda7757eae28c36 (diff) |
java: convert fields to local variables where possible
found by PMD
Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542
Reviewed-on: https://gerrit.libreoffice.org/12376
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity/qa')
-rw-r--r-- | connectivity/qa/connectivity/tools/RowSet.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/qa/connectivity/tools/RowSet.java b/connectivity/qa/connectivity/tools/RowSet.java index 5897fce5f0d8..22b52156fa23 100644 --- a/connectivity/qa/connectivity/tools/RowSet.java +++ b/connectivity/qa/connectivity/tools/RowSet.java @@ -42,19 +42,18 @@ public class RowSet implements XRowSet, XRow { private XRowSet m_rowSet; private XRow m_row; - private XPropertySet m_rowSetProps; public RowSet( XMultiServiceFactory _orb, String _dataSource, int _commandType, String _command ) { try { - m_rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _orb.createInstance( "com.sun.star.sdb.RowSet" ) ); - m_rowSetProps.setPropertyValue( "DataSourceName", _dataSource ); - m_rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) ); - m_rowSetProps.setPropertyValue( "Command", _command ); + XPropertySet rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _orb.createInstance( "com.sun.star.sdb.RowSet" ) ); + rowSetProps.setPropertyValue( "DataSourceName", _dataSource ); + rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) ); + rowSetProps.setPropertyValue( "Command", _command ); - m_rowSet = UnoRuntime.queryInterface( XRowSet.class, m_rowSetProps ); - m_row = UnoRuntime.queryInterface( XRow.class, m_rowSetProps ); + m_rowSet = UnoRuntime.queryInterface( XRowSet.class, rowSetProps ); + m_row = UnoRuntime.queryInterface( XRow.class, rowSetProps ); } catch ( Exception e ) { |