diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-18 10:01:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-18 12:44:28 +0200 |
commit | 0063cf285696951e336b9cec1da8881997b286ce (patch) | |
tree | be70dfd8127c35f9e4a6d18d4db459a587813bf4 /qadevOOo/tests | |
parent | 250391009aec9930abcc57930ddd4b6f56f4df9c (diff) |
java: make fields final where possible
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
Diffstat (limited to 'qadevOOo/tests')
55 files changed, 84 insertions, 85 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java index 54dc72284519..be71e7e65e76 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java @@ -49,7 +49,7 @@ public class _XAccessibleComponent extends MultiMethodTest { public XAccessibleComponent oObj = null; private Rectangle bounds = null; - private ArrayList<Rectangle> KnownBounds = new ArrayList<Rectangle>(); + private final ArrayList<Rectangle> KnownBounds = new ArrayList<Rectangle>(); /** diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java index 63de455e43c6..a7fbc9d70ada 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java @@ -49,7 +49,7 @@ public class _XAccessibleValue extends MultiMethodTest { private double minVal = 0; private double maxVal = 0; - private double curVal = 0; + private final double curVal = 0; private Object val = null; XAccessibleValue anotherFromGroup = null; diff --git a/qadevOOo/tests/java/ifc/awt/_XComboBox.java b/qadevOOo/tests/java/ifc/awt/_XComboBox.java index 89cd9d0337a2..094bcf18c52a 100644 --- a/qadevOOo/tests/java/ifc/awt/_XComboBox.java +++ b/qadevOOo/tests/java/ifc/awt/_XComboBox.java @@ -82,8 +82,8 @@ public class _XComboBox extends MultiMethodTest { } } - private TestActionListener actionListener = new TestActionListener(); - private TestItemListener itemListener = new TestItemListener(); + private final TestActionListener actionListener = new TestActionListener(); + private final TestItemListener itemListener = new TestItemListener(); short lineCount = 0; short itemCount = 0; diff --git a/qadevOOo/tests/java/ifc/awt/_XRadioButton.java b/qadevOOo/tests/java/ifc/awt/_XRadioButton.java index 3b6e0506e7dd..306fed422425 100644 --- a/qadevOOo/tests/java/ifc/awt/_XRadioButton.java +++ b/qadevOOo/tests/java/ifc/awt/_XRadioButton.java @@ -48,7 +48,7 @@ public class _XRadioButton extends MultiMethodTest { protected class TestItemListener implements com.sun.star.awt.XItemListener { public boolean disposingCalled = false ; public boolean itemStateChangedCalled = false ; - private java.io.PrintWriter log = null ; + private final java.io.PrintWriter log; public TestItemListener(java.io.PrintWriter log) { this.log = log ; diff --git a/qadevOOo/tests/java/ifc/awt/_XSpinField.java b/qadevOOo/tests/java/ifc/awt/_XSpinField.java index 8f10dd4833ed..c1f2e0eb3aba 100644 --- a/qadevOOo/tests/java/ifc/awt/_XSpinField.java +++ b/qadevOOo/tests/java/ifc/awt/_XSpinField.java @@ -69,7 +69,7 @@ public class _XSpinField extends MultiMethodTest { public void disposing(EventObject e) {} } - private TestListener listener = new TestListener() ; + private final TestListener listener = new TestListener() ; /** * Just adds a listener. <p> diff --git a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java index 290f4de21670..d82baf23b967 100644 --- a/qadevOOo/tests/java/ifc/awt/_XTopWindow.java +++ b/qadevOOo/tests/java/ifc/awt/_XTopWindow.java @@ -51,7 +51,7 @@ public class _XTopWindow extends MultiMethodTest { * method calls. */ protected class TestListener implements XTopWindowListener { - private PrintWriter log = null ; + private final PrintWriter log; public boolean activated = false ; public boolean deactivated = false ; diff --git a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java index ff0102a89ddf..976c8f430351 100644 --- a/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java +++ b/qadevOOo/tests/java/ifc/awt/_XUserInputInterception.java @@ -401,11 +401,11 @@ public class _XUserInputInterception extends MultiMethodTest { * represents an <CODE>EventType</CODE> * @see EventTest.EventTriggerType */ - private int eventType = 0; + private final int eventType; /** * represents a <CODE>XModel</CODE> of a document */ - private XModel xModel = null; + private final XModel xModel; /** * Creates an instacne of this class. The parameter <CODE>eType</CODE> represents diff --git a/qadevOOo/tests/java/ifc/awt/_XWindow.java b/qadevOOo/tests/java/ifc/awt/_XWindow.java index b6258d705fc3..44d3f3646c52 100644 --- a/qadevOOo/tests/java/ifc/awt/_XWindow.java +++ b/qadevOOo/tests/java/ifc/awt/_XWindow.java @@ -191,7 +191,7 @@ public class _XWindow extends MultiMethodTest { } - private TestWindowListener wListener = new TestWindowListener() ; + private final TestWindowListener wListener = new TestWindowListener() ; /** @@ -341,7 +341,7 @@ public class _XWindow extends MultiMethodTest { } - private TestFocusListener fListener = new TestFocusListener(); + private final TestFocusListener fListener = new TestFocusListener(); /** * Test calls the method. Then we change focus and check that listener's @@ -414,7 +414,7 @@ public class _XWindow extends MultiMethodTest { public void init() { pressed = false; released = false; } } - private TestKeyListener kListener = new TestKeyListener(); + private final TestKeyListener kListener = new TestKeyListener(); /** * Test calls the method. <p> @@ -477,7 +477,7 @@ public class _XWindow extends MultiMethodTest { } - private TestMouseListener mListener = new TestMouseListener(); + private final TestMouseListener mListener = new TestMouseListener(); /** * Test calls the method. <p> @@ -528,7 +528,7 @@ public class _XWindow extends MultiMethodTest { } - private TestMouseMotionListener mmListener = new TestMouseMotionListener(); + private final TestMouseMotionListener mmListener = new TestMouseMotionListener(); /** * Test calls the method. <p> @@ -573,7 +573,7 @@ public class _XWindow extends MultiMethodTest { } - private TestPaintListener pListener = new TestPaintListener(); + private final TestPaintListener pListener = new TestPaintListener(); /** * Test calls the method. <p> diff --git a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java index 564f5f1023d3..925b20e9e494 100644 --- a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java @@ -55,7 +55,7 @@ import com.sun.star.uno.UnoRuntime; public class _XFastPropertySet extends MultiMethodTest { public XFastPropertySet oObj = null; - private List<Integer> handles = new ArrayList<Integer>(); + private final List<Integer> handles = new ArrayList<Integer>(); private int handle = -1; private Set<String> exclude = null ; diff --git a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java index 1ea2fab40c46..5250e6de62a9 100644 --- a/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XMultiPropertySet.java @@ -93,7 +93,7 @@ public class _XMultiPropertySet extends MultiMethodTest { public void disposing (EventObject obj) {} } - private XPropertiesChangeListener PClistener = + private final XPropertiesChangeListener PClistener = new MyChangeListener(); /** diff --git a/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java b/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java index bebad0e524f2..d942b6d02f85 100644 --- a/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java +++ b/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java @@ -66,7 +66,7 @@ public class _XBridgeFactory extends MultiMethodTest { /** * the acceptor */ - private XAcceptor acc = null ; + private final XAcceptor acc; /** * If exception occurred during method call it is * stored in this field. diff --git a/qadevOOo/tests/java/ifc/bridge/_XUnoUrlResolver.java b/qadevOOo/tests/java/ifc/bridge/_XUnoUrlResolver.java index d108053e2341..0cb01dd30f88 100644 --- a/qadevOOo/tests/java/ifc/bridge/_XUnoUrlResolver.java +++ b/qadevOOo/tests/java/ifc/bridge/_XUnoUrlResolver.java @@ -61,7 +61,7 @@ public class _XUnoUrlResolver extends MultiMethodTest { * * @see com.sun.star.lang.MultiServiceFactory */ - private XMultiServiceFactory xMSF = null; + private final XMultiServiceFactory xMSF; /** * Construct object with a MultiServiceFactory @@ -91,16 +91,15 @@ public class _XUnoUrlResolver extends MultiMethodTest { * Thread for creating a bridge so the resolver can access it */ class BridgeThread extends Thread { - private XBridgeFactory xBrdgFctr = null; - private XInstanceProvider xInstProv = null; - private XAcceptor xAcc = null; - private String connectString = null; + private final XBridgeFactory xBrdgFctr; + private final XInstanceProvider xInstProv; + private final XAcceptor xAcc; + private final String connectString; public XBridge xBridge = null; public BridgeThread(XAcceptor xAcc, XBridgeFactory xBrdgFctr, - XInstanceProvider xInstProv, String connectString - ) { + XInstanceProvider xInstProv, String connectString) { this.xInstProv = xInstProv; this.xBrdgFctr = xBrdgFctr; this.xAcc = xAcc; diff --git a/qadevOOo/tests/java/ifc/connection/_XAcceptor.java b/qadevOOo/tests/java/ifc/connection/_XAcceptor.java index 01d8fdff0cad..f939eb2c0d42 100644 --- a/qadevOOo/tests/java/ifc/connection/_XAcceptor.java +++ b/qadevOOo/tests/java/ifc/connection/_XAcceptor.java @@ -56,7 +56,7 @@ public class _XAcceptor extends MultiMethodTest { * stored in this field. */ public Exception ex = null ; - private XAcceptor acc = null ; + private final XAcceptor acc; /** * If method call returns some value it stores in this field. */ diff --git a/qadevOOo/tests/java/ifc/connection/_XConnector.java b/qadevOOo/tests/java/ifc/connection/_XConnector.java index 16319b34e13f..adc8a044e711 100644 --- a/qadevOOo/tests/java/ifc/connection/_XConnector.java +++ b/qadevOOo/tests/java/ifc/connection/_XConnector.java @@ -50,7 +50,7 @@ public class _XConnector extends MultiMethodTest { /** * the acceptor */ - private XAcceptor acc = null ; + private final XAcceptor acc; /** * If exception occurred during method call it is * stored in this field. diff --git a/qadevOOo/tests/java/ifc/document/_XFilter.java b/qadevOOo/tests/java/ifc/document/_XFilter.java index 991ef40b2af9..3f4779721296 100644 --- a/qadevOOo/tests/java/ifc/document/_XFilter.java +++ b/qadevOOo/tests/java/ifc/document/_XFilter.java @@ -157,8 +157,8 @@ public class _XFilter extends MultiMethodTest { */ protected class FilterThread extends Thread { - public boolean filterRes = true ; - private XFilter Filter = null ; + public boolean filterRes = true; + private final XFilter Filter; public PropertyValue[] mdesc = null; public FilterThread(XFilter Filter) { diff --git a/qadevOOo/tests/java/ifc/form/_XApproveActionBroadcaster.java b/qadevOOo/tests/java/ifc/form/_XApproveActionBroadcaster.java index a0c9185f3071..f02f0251629e 100644 --- a/qadevOOo/tests/java/ifc/form/_XApproveActionBroadcaster.java +++ b/qadevOOo/tests/java/ifc/form/_XApproveActionBroadcaster.java @@ -56,7 +56,7 @@ public class _XApproveActionBroadcaster extends MultiMethodTest { } - private TestListener listener = new TestListener(); + private final TestListener listener = new TestListener(); /** * Test calls the method. <p> diff --git a/qadevOOo/tests/java/ifc/form/_XLoadable.java b/qadevOOo/tests/java/ifc/form/_XLoadable.java index ed7bf18270d9..27729c2b30c1 100644 --- a/qadevOOo/tests/java/ifc/form/_XLoadable.java +++ b/qadevOOo/tests/java/ifc/form/_XLoadable.java @@ -51,7 +51,7 @@ public class _XLoadable extends MultiMethodTest { public boolean reloadingCalled = false ; public boolean unloadedCalled = false ; public boolean unloadingCalled = false ; - private java.io.PrintWriter log = null ; + private final java.io.PrintWriter log; public TestLoadListener(java.io.PrintWriter log) { this.log = log ; diff --git a/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java b/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java index e8cd10a36c1e..fbd9def90b75 100644 --- a/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java +++ b/qadevOOo/tests/java/ifc/form/_XUpdateBroadcaster.java @@ -118,7 +118,7 @@ public class _XUpdateBroadcaster extends MultiMethodTest { } } - private TestListener listener = new TestListener(); + private final TestListener listener = new TestListener(); /** * The listener methods calls are checked twice with approving diff --git a/qadevOOo/tests/java/ifc/form/binding/_XBindableValue.java b/qadevOOo/tests/java/ifc/form/binding/_XBindableValue.java index 498235f450b7..2c0869dc5645 100644 --- a/qadevOOo/tests/java/ifc/form/binding/_XBindableValue.java +++ b/qadevOOo/tests/java/ifc/form/binding/_XBindableValue.java @@ -83,7 +83,7 @@ public class _XBindableValue extends MultiMethodTest { class MyValueBinding implements XValueBinding { private Type[] TypeArray; - private ArrayList<Type> types = new ArrayList<Type>(); + private final ArrayList<Type> types = new ArrayList<Type>(); public com.sun.star.uno.Type[] getSupportedValueTypes() { return TypeArray; diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatch.java b/qadevOOo/tests/java/ifc/frame/_XDispatch.java index 98ef2463ae10..f686150ab870 100644 --- a/qadevOOo/tests/java/ifc/frame/_XDispatch.java +++ b/qadevOOo/tests/java/ifc/frame/_XDispatch.java @@ -59,7 +59,7 @@ public class _XDispatch extends MultiMethodTest { com.sun.star.frame.XStatusListener { public boolean disposingCalled = false ; public boolean statusChangedCalled = false ; - private java.io.PrintWriter log = null ; + private final java.io.PrintWriter log; public TestStatusListener(java.io.PrintWriter log) { this.log = log ; @@ -89,7 +89,7 @@ public class _XDispatch extends MultiMethodTest { com.sun.star.frame.XDispatchResultListener { public boolean disposingCalled = false ; public boolean finishedDispatch = false ; - private java.io.PrintWriter log = null ; + private final java.io.PrintWriter log; public TestNotificationListener(java.io.PrintWriter log) { this.log = log ; diff --git a/qadevOOo/tests/java/ifc/frame/_XDispatchProviderInterception.java b/qadevOOo/tests/java/ifc/frame/_XDispatchProviderInterception.java index 4b72518f8788..b4ab947731e4 100644 --- a/qadevOOo/tests/java/ifc/frame/_XDispatchProviderInterception.java +++ b/qadevOOo/tests/java/ifc/frame/_XDispatchProviderInterception.java @@ -49,7 +49,7 @@ public class _XDispatchProviderInterception extends MultiMethodTest { * provider. */ public class TestInterceptor implements XDispatchProviderInterceptor { - private PrintWriter log = null ; + private final PrintWriter log; public XDispatchProvider master = null, slave = null ; public TestInterceptor(PrintWriter log) { diff --git a/qadevOOo/tests/java/ifc/frame/_XLayoutManager.java b/qadevOOo/tests/java/ifc/frame/_XLayoutManager.java index 2510cfe8fe0a..e250ce2ea4e0 100644 --- a/qadevOOo/tests/java/ifc/frame/_XLayoutManager.java +++ b/qadevOOo/tests/java/ifc/frame/_XLayoutManager.java @@ -32,7 +32,7 @@ public class _XLayoutManager extends MultiMethodTest { public XLayoutManager oObj = null; private XFrame xFrame = null; - private String sElementName = "private:resource/menubar/myMenu"; + private final String sElementName = "private:resource/menubar/myMenu"; @Override public void before() { diff --git a/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java b/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java index c570f6531c98..a4a94055c328 100644 --- a/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java +++ b/qadevOOo/tests/java/ifc/frame/_XNotifyingDispatch.java @@ -57,7 +57,7 @@ public class _XNotifyingDispatch extends MultiMethodTest { com.sun.star.frame.XDispatchResultListener { public boolean disposingCalled = false ; public boolean finishedDispatch = false ; - private java.io.PrintWriter log = null ; + private final java.io.PrintWriter log; public TestNotificationListener(java.io.PrintWriter log) { this.log = log ; diff --git a/qadevOOo/tests/java/ifc/frame/_XUIControllerRegistration.java b/qadevOOo/tests/java/ifc/frame/_XUIControllerRegistration.java index 21a627d7191c..e2c236e4ac2e 100644 --- a/qadevOOo/tests/java/ifc/frame/_XUIControllerRegistration.java +++ b/qadevOOo/tests/java/ifc/frame/_XUIControllerRegistration.java @@ -24,7 +24,7 @@ import lib.MultiMethodTest; public class _XUIControllerRegistration extends MultiMethodTest { public XUIControllerRegistration oObj = null; private String aRegisteredController = null; - private String aController = ".uno:MySecondController"; + private final String aController = ".uno:MySecondController"; @Override public void before() { diff --git a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java index c96c8e42f72b..001936927b40 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java +++ b/qadevOOo/tests/java/ifc/i18n/_XExtendedTransliteration.java @@ -27,7 +27,7 @@ import lib.MultiMethodTest; */ public class _XExtendedTransliteration extends MultiMethodTest { public XExtendedTransliteration oObj = null; - private Locale loc = new Locale("en", "US", "") ; + private final Locale loc = new Locale("en", "US", "") ; @Override public void before() { diff --git a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java index 17991b1429fe..5d8cce2393e8 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java +++ b/qadevOOo/tests/java/ifc/i18n/_XTransliteration.java @@ -48,7 +48,7 @@ import com.sun.star.lang.Locale; public class _XTransliteration extends MultiMethodTest { public XTransliteration oObj = null; - private Locale loc = new Locale("en", "EN", "") ; + private final Locale loc = new Locale("en", "EN", "") ; /** * Gets all available transliteration modules. <p> diff --git a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java index 32ce987f6f5d..52952cfd2695 100644 --- a/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java +++ b/qadevOOo/tests/java/ifc/io/_XActiveDataControl.java @@ -88,7 +88,7 @@ public class _XActiveDataControl extends MultiMethodTest { /** * The listener is used to verify results of the methods. */ - private TestStreamListener listener = new TestStreamListener(); + private final TestStreamListener listener = new TestStreamListener(); /** * XStreamListener implementation. Sets variables diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java index c822438d9be0..3506d2a894d4 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer.java @@ -50,7 +50,7 @@ public class _XSingleSelectQueryAnalyzer extends MultiMethodTest { // oObj filled by MultiMethodTest public XSingleSelectQueryAnalyzer oObj = null ; - private String queryString = "SELECT * FROM \"biblio\""; + private final String queryString = "SELECT * FROM \"biblio\""; private XSingleSelectQueryComposer xComposer = null; diff --git a/qadevOOo/tests/java/ifc/sdbc/_XRow.java b/qadevOOo/tests/java/ifc/sdbc/_XRow.java index 8f1264182f95..dbbad4353a69 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XRow.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XRow.java @@ -95,7 +95,7 @@ public class _XRow extends MultiMethodTest { // oObj filled by MultiMethodTest public XRow oObj = null ; private List<Object> data = null ; - private boolean notNullRes = true ; + private final boolean notNullRes = true; /** * Retrieves object relation first. diff --git a/qadevOOo/tests/java/ifc/sdbc/_XRowSet.java b/qadevOOo/tests/java/ifc/sdbc/_XRowSet.java index bf6cd7dc1952..771d51ca062a 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XRowSet.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XRowSet.java @@ -53,7 +53,7 @@ public class _XRowSet extends MultiMethodTest { // oObj filled by MultiMethodTest public XRowSet oObj = null ; private _XRowSetApproveBroadcaster.RowSetApproveChecker checker = null ; - private TestListener listener = new TestListener() ; + private final TestListener listener = new TestListener() ; private class TestListener implements XRowSetListener { public boolean cursorMoved = false ; diff --git a/qadevOOo/tests/java/ifc/text/_XDefaultNumberingProvider.java b/qadevOOo/tests/java/ifc/text/_XDefaultNumberingProvider.java index 2872cc6a7b68..6a98f0696e64 100644 --- a/qadevOOo/tests/java/ifc/text/_XDefaultNumberingProvider.java +++ b/qadevOOo/tests/java/ifc/text/_XDefaultNumberingProvider.java @@ -38,7 +38,7 @@ import com.sun.star.text.XDefaultNumberingProvider; public class _XDefaultNumberingProvider extends MultiMethodTest { public static XDefaultNumberingProvider oObj = null; - private Locale loc = new Locale("en", "EN", "") ; + private final Locale loc = new Locale("en", "EN", "") ; /** * Just gets numberings for "en" locale. <p> diff --git a/qadevOOo/tests/java/ifc/ucb/_XDataContainer.java b/qadevOOo/tests/java/ifc/ucb/_XDataContainer.java index 4dd9d6daa1e9..0f07c41ef532 100644 --- a/qadevOOo/tests/java/ifc/ucb/_XDataContainer.java +++ b/qadevOOo/tests/java/ifc/ucb/_XDataContainer.java @@ -39,7 +39,7 @@ import com.sun.star.ucb.XDataContainer; public class _XDataContainer extends MultiMethodTest { public static XDataContainer oObj = null; // oObj filled by MultiMethodTest - private byte[] data = new byte[] {34, 35, 36} ; + private final byte[] data = new byte[] {34, 35, 36} ; private String dataURL = null; /** diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java index b67ed2d5a324..09716e50c738 100644 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java @@ -35,8 +35,8 @@ import lib.MultiMethodTest; public class _XUIConfigurationManager extends MultiMethodTest { public XUIConfigurationManager oObj; - private String msResourceUrl = "private:resource/menubar/menubar"; - private String msMyResourceUrl = "private:resource/menubar/mymenubar"; + private final String msResourceUrl = "private:resource/menubar/menubar"; + private final String msMyResourceUrl = "private:resource/menubar/mymenubar"; private XIndexContainer mxSettings = null; private XIndexAccess mxMenuBarSettings = null; private XMultiServiceFactory mxMSF = null; diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java index f4e573174f0f..6cfcc92de4e2 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XExecutableDialog.java @@ -97,8 +97,8 @@ public class _XExecutableDialog extends MultiMethodTest { */ protected class ExecThread extends Thread { - public short execRes = (short) 17 ; - private XExecutableDialog Diag = null ; + public short execRes = (short) 17; + private final XExecutableDialog Diag; public ExecThread(XExecutableDialog Diag) { this.Diag = Diag ; diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java index 23492cb58863..d5fed39c900f 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePicker.java @@ -43,7 +43,7 @@ public class _XFilePicker extends MultiMethodTest { public XFilePicker oObj = null; private String dir = null ; - private String fname = "space-metal.jpg" ; + private final String fname = "space-metal.jpg" ; /** * Sets the current directory to the test document directory. <p> diff --git a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java index 503baf630a4b..f34dd3e879ec 100644 --- a/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java +++ b/qadevOOo/tests/java/ifc/ui/dialogs/_XFilePickerNotifier.java @@ -183,7 +183,7 @@ public class _XFilePickerNotifier extends MultiMethodTest { protected class ExecThread extends Thread { public short execRes = (short) 17 ; - private XExecutableDialog Diag = null ; + private final XExecutableDialog Diag; public ExecThread(XExecutableDialog Diag) { this.Diag = Diag ; diff --git a/qadevOOo/tests/java/ifc/util/_XFlushable.java b/qadevOOo/tests/java/ifc/util/_XFlushable.java index 8cb849b008bb..d96e075e95e5 100644 --- a/qadevOOo/tests/java/ifc/util/_XFlushable.java +++ b/qadevOOo/tests/java/ifc/util/_XFlushable.java @@ -52,7 +52,7 @@ public class _XFlushable extends MultiMethodTest { public boolean wasFlushed() { return called; } } - private MyFlushListener listener1 = new MyFlushListener(), + private final MyFlushListener listener1 = new MyFlushListener(), listener2 = new MyFlushListener() ; /** diff --git a/qadevOOo/tests/java/ifc/util/_XModifyBroadcaster.java b/qadevOOo/tests/java/ifc/util/_XModifyBroadcaster.java index 4e3a3043113d..a8fd74314e6b 100644 --- a/qadevOOo/tests/java/ifc/util/_XModifyBroadcaster.java +++ b/qadevOOo/tests/java/ifc/util/_XModifyBroadcaster.java @@ -51,7 +51,7 @@ public class _XModifyBroadcaster extends MultiMethodTest { } } - private TestModifyListener listener = new TestModifyListener(); + private final TestModifyListener listener = new TestModifyListener(); /** * Just calls the method. <p> diff --git a/qadevOOo/tests/java/ifc/util/_XReplaceable.java b/qadevOOo/tests/java/ifc/util/_XReplaceable.java index ca3cca6ee7c0..c1634a7763ca 100644 --- a/qadevOOo/tests/java/ifc/util/_XReplaceable.java +++ b/qadevOOo/tests/java/ifc/util/_XReplaceable.java @@ -45,7 +45,7 @@ public class _XReplaceable extends MultiMethodTest { public XReplaceable oObj = null; public XReplaceDescriptor Rdesc = null; private String mSearchString = "xTextDoc"; - private String mReplaceString = "** xTextDoc"; + private final String mReplaceString = "** xTextDoc"; private boolean mDispose = false; /** diff --git a/qadevOOo/tests/java/ifc/xml/sax/_XDocumentHandler.java b/qadevOOo/tests/java/ifc/xml/sax/_XDocumentHandler.java index 5e31bbc138af..d73f6c3ab155 100644 --- a/qadevOOo/tests/java/ifc/xml/sax/_XDocumentHandler.java +++ b/qadevOOo/tests/java/ifc/xml/sax/_XDocumentHandler.java @@ -76,7 +76,7 @@ import com.sun.star.xml.sax.XLocator; public class _XDocumentHandler extends MultiMethodTest { private static class DocumentLocator implements XLocator { - private PrintWriter log = null ; + private final PrintWriter log; public DocumentLocator(PrintWriter log) { this.log = log ; } diff --git a/qadevOOo/tests/java/mod/_fwk/ModuleUIConfigurationManager.java b/qadevOOo/tests/java/mod/_fwk/ModuleUIConfigurationManager.java index 3496c783a97a..e572e3dfa953 100644 --- a/qadevOOo/tests/java/mod/_fwk/ModuleUIConfigurationManager.java +++ b/qadevOOo/tests/java/mod/_fwk/ModuleUIConfigurationManager.java @@ -124,9 +124,9 @@ public class ModuleUIConfigurationManager extends TestCase { */ public static class ConfigurationListener implements _XUIConfiguration.XUIConfigurationListenerImpl { private boolean triggered = false; - private PrintWriter log = null; - private XUIConfigurationManager xUIManager = null; - private XMultiServiceFactory xMSF = null; + private final PrintWriter log; + private final XUIConfigurationManager xUIManager; + private final XMultiServiceFactory xMSF; public ConfigurationListener(PrintWriter _log, XUIConfigurationManager xUIManager, XMultiServiceFactory xMSF) { log = _log; diff --git a/qadevOOo/tests/java/mod/_fwk/UIConfigurationManager.java b/qadevOOo/tests/java/mod/_fwk/UIConfigurationManager.java index 787abf174d06..75d78cdc71be 100644 --- a/qadevOOo/tests/java/mod/_fwk/UIConfigurationManager.java +++ b/qadevOOo/tests/java/mod/_fwk/UIConfigurationManager.java @@ -116,9 +116,9 @@ public class UIConfigurationManager extends TestCase { */ public static class ConfigurationListener implements _XUIConfiguration.XUIConfigurationListenerImpl { private boolean triggered = false; - private PrintWriter log = null; - private XUIConfigurationManager xUIManager = null; - private XMultiServiceFactory xMSF = null; + private final PrintWriter log; + private final XUIConfigurationManager xUIManager; + private final XMultiServiceFactory xMSF; private static int iUniqueCounter; public ConfigurationListener(PrintWriter _log, XUIConfigurationManager xUIManager, XMultiServiceFactory xMSF) { diff --git a/qadevOOo/tests/java/mod/_remotebridge/uno/various.java b/qadevOOo/tests/java/mod/_remotebridge/uno/various.java index 71f7a5af6ec7..438fcbba83cb 100644 --- a/qadevOOo/tests/java/mod/_remotebridge/uno/various.java +++ b/qadevOOo/tests/java/mod/_remotebridge/uno/various.java @@ -66,7 +66,7 @@ public class various extends TestCase { * which is free. */ protected static final int basePort = 50000; - private int curPort = 50000; + private final int curPort = 50000; private XAcceptor xAcctr; private XConnector xCntr; @@ -86,7 +86,7 @@ public class various extends TestCase { * * @see com.sun.star.lang.MultiServiceFactory */ - private XMultiServiceFactory xMSF = null; + private final XMultiServiceFactory xMSF; /** * Construct object with a MultiServiceFactory @@ -124,9 +124,9 @@ public class various extends TestCase { * stored in this field. */ public Exception ex = null ; - private XAcceptor acc = null ; - private XInstanceProvider xInstProv = null ; - private XBridgeFactory xBrdgFctr = null; + private final XAcceptor acc; + private final XInstanceProvider xInstProv; + private final XBridgeFactory xBrdgFctr; /** * If method call returns some value it stores in this field. */ diff --git a/qadevOOo/tests/java/mod/_remotebridge/various.java b/qadevOOo/tests/java/mod/_remotebridge/various.java index a3caa518fd05..4983092f37d3 100644 --- a/qadevOOo/tests/java/mod/_remotebridge/various.java +++ b/qadevOOo/tests/java/mod/_remotebridge/various.java @@ -67,7 +67,7 @@ public class various extends TestCase { * which is free. */ protected static final int basePort = 50000; - private int curPort = 50000; + private final int curPort = 50000; private XAcceptor xAcctr; private XConnector xCntr; @@ -87,7 +87,7 @@ public class various extends TestCase { * * @see com.sun.star.lang.MultiServiceFactory */ - private XMultiServiceFactory xMSF = null; + private final XMultiServiceFactory xMSF; /** * Construct object with a MultiServiceFactory @@ -125,7 +125,7 @@ public class various extends TestCase { * stored in this field. */ public Exception ex = null ; - private XAcceptor acc = null ; + private final XAcceptor acc; /** * If method call returns some value it stores in this field. */ diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java index 129504654821..13f53b277378 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvCell.java @@ -170,8 +170,8 @@ public class ScAccessibleCsvCell extends TestCase { public class loadThread extends Thread { - private SOfficeFactory SOF = null ; - private PropertyValue[] args = null; + private final SOfficeFactory SOF; + private final PropertyValue[] args; public XComponent xSpreadSheedDoc = null; public loadThread(SOfficeFactory SOF, PropertyValue[] Args) { diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java index 0dc1d8754ff5..1237e9817f11 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvGrid.java @@ -156,8 +156,8 @@ public class ScAccessibleCsvGrid extends TestCase { public class loadThread extends Thread { - private SOfficeFactory SOF = null ; - private PropertyValue[] args = null; + private final SOfficeFactory SOF; + private final PropertyValue[] args; public XComponent xSpreadSheedDoc = null; public loadThread(SOfficeFactory SOF, PropertyValue[] Args) { diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java index 41f33cc78117..45c3f9e4e16e 100644 --- a/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java +++ b/qadevOOo/tests/java/mod/_sc/ScAccessibleCsvRuler.java @@ -191,8 +191,8 @@ public class ScAccessibleCsvRuler extends TestCase { public class loadThread extends Thread { - private SOfficeFactory SOF = null ; - private PropertyValue[] args = null; + private final SOfficeFactory SOF; + private final PropertyValue[] args; public XComponent xSpreadSheedDoc = null; public loadThread(SOfficeFactory SOF, PropertyValue[] Args) { diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java index 2ac0c175e414..2467ee34b6a1 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupItemObj.java @@ -56,7 +56,7 @@ public class ScDataPilotFieldGroupItemObj extends TestCase * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java index a815bb2d2518..af23d1e24d15 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj.java @@ -55,7 +55,7 @@ public class ScDataPilotFieldGroupObj extends TestCase * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java index 52a36ed1ad99..5aa809eb50b1 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj.java @@ -55,7 +55,7 @@ public class ScDataPilotFieldGroupsObj extends TestCase * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java index 2c668328a51b..01d49050ef25 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj.java @@ -69,7 +69,7 @@ public class ScDataPilotFieldObj extends TestCase { * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java index 5c01cf02c933..2c6e029fb729 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj.java @@ -70,7 +70,7 @@ public class ScDataPilotItemObj extends TestCase { * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java index b9274917425d..9baca8760aaf 100644 --- a/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj.java @@ -70,7 +70,7 @@ public class ScDataPilotItemsObj extends TestCase { * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java index 705457967406..ffc09302a435 100644 --- a/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java +++ b/qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_DataPilotItemsEnumeration.java @@ -72,7 +72,7 @@ public class ScIndexEnumeration_DataPilotItemsEnumeration * A field is filled some values. This integer determines the size of the * field in x and y direction. */ - private int mMaxFieldIndex = 6; + private final int mMaxFieldIndex = 6; /** * Creates Spreadsheet document. diff --git a/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java b/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java index 7c0645ef4964..1fc6c51fe8c5 100644 --- a/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java +++ b/qadevOOo/tests/java/mod/_toolkit/UnoTreeControl.java @@ -256,7 +256,7 @@ public class UnoTreeControl extends TestCase { } private class execurteDialog extends Thread{ - private XDialog mXDialog; + private final XDialog mXDialog; public execurteDialog(XDialog xDialog){ mXDialog = xDialog; |