summaryrefslogtreecommitdiff
path: root/extensions/qa
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 /extensions/qa
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 'extensions/qa')
-rw-r--r--extensions/qa/integration/extensions/MethodHandler.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/extensions/qa/integration/extensions/MethodHandler.java b/extensions/qa/integration/extensions/MethodHandler.java
index b2a56037b4a6..c362fae60609 100644
--- a/extensions/qa/integration/extensions/MethodHandler.java
+++ b/extensions/qa/integration/extensions/MethodHandler.java
@@ -25,22 +25,19 @@ import com.sun.star.inspection.*;
public class MethodHandler implements XPropertyHandler
{
- private XComponentContext m_context;
private XIntrospection m_introspection;
- private XIntrospectionAccess m_introspectionAccess;
private XIdlMethod[] m_methods;
private java.util.HashMap<String,XIdlMethod> m_methodsHash;
/** Creates a new instance of MethodHandler */
public MethodHandler( XComponentContext _context )
{
- m_context = _context;
m_methodsHash = new java.util.HashMap<String,XIdlMethod>();
try
{
m_introspection = UnoRuntime.queryInterface( XIntrospection.class,
- m_context.getServiceManager().createInstanceWithContext( "com.sun.star.beans.Introspection", m_context )
+ _context.getServiceManager().createInstanceWithContext( "com.sun.star.beans.Introspection", _context )
);
}
catch( com.sun.star.uno.Exception e )
@@ -162,15 +159,14 @@ public class MethodHandler implements XPropertyHandler
if ( m_introspection == null )
return;
- m_introspectionAccess = null;
m_methods = null;
m_methodsHash = new java.util.HashMap<String,XIdlMethod>();
- m_introspectionAccess = m_introspection.inspect( _component );
- if ( m_introspectionAccess == null )
+ XIntrospectionAccess introspectionAccess = m_introspection.inspect( _component );
+ if ( introspectionAccess == null )
return;
- m_methods = m_introspectionAccess.getMethods( MethodConcept.ALL );
+ m_methods = introspectionAccess.getMethods( MethodConcept.ALL );
}
public boolean isComposable(String _propertyName) throws com.sun.star.beans.UnknownPropertyException