summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-12 09:55:57 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-12 11:03:29 +0000
commitbb437029c1e5331bcc3f8fb2fc87837142a52f33 (patch)
tree56bde4059792a5284e90ae3b10ee4388cc913a54 /connectivity
parent84f7f412bfc9e18b1ff8b133ceda7757eae28c36 (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')
-rw-r--r--connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java9
-rw-r--r--connectivity/qa/connectivity/tools/RowSet.java13
2 files changed, 8 insertions, 14 deletions
diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java
index 94b431965d71..1f1e65462b82 100644
--- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java
+++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java
@@ -27,14 +27,9 @@ package com.sun.star.sdbcx.comp.hsqldb;
public class StorageNativeOutputStream {
static { NativeLibraries.load(); }
- private String name;
- private Object key;
-
/** Creates a new instance of StorageNativeOutputStream */
- public StorageNativeOutputStream(String _name,Object _key) {
- name = _name;
- key = _key;
- openStream(name, (String)key, NativeStorageAccess.WRITE | NativeStorageAccess.TRUNCATE);
+ public StorageNativeOutputStream(String _name, Object key) {
+ openStream(_name, (String)key, NativeStorageAccess.WRITE | NativeStorageAccess.TRUNCATE);
}
private native void openStream(String name,String key, int mode);
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 )
{