diff options
357 files changed, 863 insertions, 926 deletions
diff --git a/bean/com/sun/star/comp/beans/Controller.java b/bean/com/sun/star/comp/beans/Controller.java index 9e93c5878b2f..91f64db874c4 100644 --- a/bean/com/sun/star/comp/beans/Controller.java +++ b/bean/com/sun/star/comp/beans/Controller.java @@ -29,8 +29,8 @@ public class Controller implements com.sun.star.frame.XController { - private com.sun.star.frame.XController xController; - private com.sun.star.frame.XDispatchProvider xDispatchProvider; + private final com.sun.star.frame.XController xController; + private final com.sun.star.frame.XDispatchProvider xDispatchProvider; Controller( com.sun.star.frame.XController xController ) { diff --git a/bean/com/sun/star/comp/beans/Frame.java b/bean/com/sun/star/comp/beans/Frame.java index 59ccf2613245..fbf9ca97ef51 100644 --- a/bean/com/sun/star/comp/beans/Frame.java +++ b/bean/com/sun/star/comp/beans/Frame.java @@ -31,9 +31,9 @@ public class Frame com.sun.star.frame.XDispatchProvider, com.sun.star.frame.XDispatchProviderInterception { - private com.sun.star.frame.XFrame xFrame; - private com.sun.star.frame.XDispatchProvider xDispatchProvider; - private com.sun.star.frame.XDispatchProviderInterception xDispatchProviderInterception; + private final com.sun.star.frame.XFrame xFrame; + private final com.sun.star.frame.XDispatchProvider xDispatchProvider; + private final com.sun.star.frame.XDispatchProviderInterception xDispatchProviderInterception; public Frame( com.sun.star.frame.XFrame xFrame ) { diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index c81796daebe7..5a57dcdc8e79 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -62,7 +62,7 @@ public class LocalOfficeConnection private String mProtocol; private String mInitialObject; - private List<XEventListener> mComponents = new ArrayList<XEventListener>(); + private final List<XEventListener> mComponents = new ArrayList<XEventListener>(); private static long m_nBridgeCounter = 0; @@ -742,8 +742,8 @@ public class LocalOfficeConnection private class StreamProcessor extends Thread { - private java.io.InputStream m_in; - private java.io.PrintStream m_print; + private final java.io.InputStream m_in; + private final java.io.PrintStream m_print; public StreamProcessor(final java.io.InputStream in, final java.io.PrintStream out) { diff --git a/bean/com/sun/star/comp/beans/OfficeDocument.java b/bean/com/sun/star/comp/beans/OfficeDocument.java index a84689901f5c..10ee1ef24061 100644 --- a/bean/com/sun/star/comp/beans/OfficeDocument.java +++ b/bean/com/sun/star/comp/beans/OfficeDocument.java @@ -37,10 +37,10 @@ public class OfficeDocument extends Wrapper com.sun.star.frame.XStorable, com.sun.star.view.XPrintable { - private com.sun.star.frame.XModel xModel; - private com.sun.star.util.XModifiable xModifiable; - private com.sun.star.view.XPrintable xPrintable; - private com.sun.star.frame.XStorable xStorable; + private final com.sun.star.frame.XModel xModel; + private final com.sun.star.util.XModifiable xModifiable; + private final com.sun.star.view.XPrintable xPrintable; + private final com.sun.star.frame.XStorable xStorable; public OfficeDocument( com.sun.star.frame.XModel xModel ) { diff --git a/bean/com/sun/star/comp/beans/Wrapper.java b/bean/com/sun/star/comp/beans/Wrapper.java index 837601842e48..001770b9b230 100644 --- a/bean/com/sun/star/comp/beans/Wrapper.java +++ b/bean/com/sun/star/comp/beans/Wrapper.java @@ -45,8 +45,8 @@ class Wrapper com.sun.star.uno.IQueryInterface, com.sun.star.lang.XComponent { - private com.sun.star.uno.IQueryInterface xQueryInterface; - private com.sun.star.lang.XComponent xComponent; + private final com.sun.star.uno.IQueryInterface xQueryInterface; + private final com.sun.star.lang.XComponent xComponent; public Wrapper( com.sun.star.uno.XInterface xProxy ) { diff --git a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java index e49deff6bd18..d3a7425d83c6 100644 --- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java +++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java @@ -56,13 +56,13 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler new Class [] { java.lang.reflect.InvocationHandler.class }; private long m_bridge_handle; - private IEnvironment m_java_env; + private final IEnvironment m_java_env; /** these 2 fields are accessed directly from C++ */ private long m_receiver_handle; // on the C++ side, this is a "UNO_Interface *" private long m_td_handle; // on the C++ side, this is a "typelib_TypeDescription *" - private Type m_type; - private String m_oid; - private Class m_class; + private final Type m_type; + private final String m_oid; + private final Class m_class; public static String get_stack_trace( Throwable throwable ) diff --git a/cli_ure/qa/climaker/ClimakerTestCase.java b/cli_ure/qa/climaker/ClimakerTestCase.java index 5285ad4a1b70..e994d014e1eb 100644 --- a/cli_ure/qa/climaker/ClimakerTestCase.java +++ b/cli_ure/qa/climaker/ClimakerTestCase.java @@ -69,7 +69,7 @@ public class ClimakerTestCase extends ComplexTestCase */ class Reader extends Thread { - private java.io.InputStream is; + private final java.io.InputStream is; public Reader(java.io.InputStream stream) { is = stream; diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java index c8e7d5d84b03..66b6f5489862 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper.java @@ -15,18 +15,13 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - /* - * NativeInputStreamHelper.java - * - * Created on 9. September 2004, 11:51 - */ package com.sun.star.sdbcx.comp.hsqldb; public class NativeInputStreamHelper extends java.io.InputStream{ - private String key; - private String file; - private StorageNativeInputStream in; + private final String key; + private final String file; + private final StorageNativeInputStream in; /** Creates a new instance of NativeInputStreamHelper */ public NativeInputStreamHelper(String key,String _file) { file = _file; diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeOutputStreamHelper.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeOutputStreamHelper.java index 24776f25c2f4..6445f24139d4 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeOutputStreamHelper.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeOutputStreamHelper.java @@ -15,20 +15,13 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * NativeOutputStreamHelper.java - * - * Created on 1. September 2004, 10:39 - */ - package com.sun.star.sdbcx.comp.hsqldb; public class NativeOutputStreamHelper extends java.io.OutputStream{ - private String key; - private String file; - private StorageNativeOutputStream out; + private final String key; + private final String file; + private final StorageNativeOutputStream out; /** Creates a new instance of NativeOutputStreamHelper */ public NativeOutputStreamHelper(String key,String _file) { file = _file; diff --git a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java index 9248cdf5a546..2f3d99be6655 100644 --- a/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java +++ b/connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageFileAccess.java @@ -72,7 +72,7 @@ public class StorageFileAccess implements org.hsqldb.lib.FileAccess{ private class FileSync implements FileAccess.FileSync { - private NativeOutputStreamHelper os; + private final NativeOutputStreamHelper os; private FileSync(NativeOutputStreamHelper _os) { os = _os; diff --git a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java index 457b037c74fb..905ddc1e50e6 100644 --- a/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java +++ b/connectivity/qa/complex/connectivity/hsqldb/DatabaseMetaData.java @@ -30,8 +30,8 @@ import java.lang.reflect.Method; public class DatabaseMetaData { - private java.sql.DatabaseMetaData m_xMD; - private HsqlDriverTest m_TestCase; + private final java.sql.DatabaseMetaData m_xMD; + private final HsqlDriverTest m_TestCase; /** Creates a new instance of DatabaseMetaData */ public DatabaseMetaData(HsqlDriverTest _testCase,java.sql.DatabaseMetaData _xmd) { diff --git a/connectivity/qa/connectivity/tools/DataSource.java b/connectivity/qa/connectivity/tools/DataSource.java index 6b6048c44a96..748ee61cdefe 100644 --- a/connectivity/qa/connectivity/tools/DataSource.java +++ b/connectivity/qa/connectivity/tools/DataSource.java @@ -36,7 +36,7 @@ public class DataSource { // the service factory - private XDataSource m_dataSource; + private final XDataSource m_dataSource; public DataSource(final XMultiServiceFactory _orb, final String _registeredName) throws Exception { diff --git a/connectivity/qa/connectivity/tools/HsqlColumnDescriptor.java b/connectivity/qa/connectivity/tools/HsqlColumnDescriptor.java index 19fb59ce7427..5d9311882379 100644 --- a/connectivity/qa/connectivity/tools/HsqlColumnDescriptor.java +++ b/connectivity/qa/connectivity/tools/HsqlColumnDescriptor.java @@ -22,12 +22,12 @@ package connectivity.tools; */ public class HsqlColumnDescriptor { - private String Name; - private String TypeName; - private boolean Required; - private boolean PrimaryKey; - private String ForeignTable; - private String ForeignColumn; + private final String Name; + private final String TypeName; + private final boolean Required; + private final boolean PrimaryKey; + private final String ForeignTable; + private final String ForeignColumn; public final String getName() { return Name; } public final String getTypeName() { return TypeName; } diff --git a/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java b/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java index 992619b7c675..626f62eb8321 100644 --- a/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java +++ b/connectivity/qa/connectivity/tools/HsqlTableDescriptor.java @@ -31,8 +31,8 @@ import connectivity.tools.sdb.Connection; */ public class HsqlTableDescriptor { - private String m_name; - private HsqlColumnDescriptor[] m_columns; + private final String m_name; + private final HsqlColumnDescriptor[] m_columns; /** Creates a new instance of HsqlTableDescriptor */ public HsqlTableDescriptor( String _name, HsqlColumnDescriptor[] _columns ) diff --git a/connectivity/qa/connectivity/tools/QueryDefinition.java b/connectivity/qa/connectivity/tools/QueryDefinition.java index ab5fe513988f..b939fdbb22e3 100644 --- a/connectivity/qa/connectivity/tools/QueryDefinition.java +++ b/connectivity/qa/connectivity/tools/QueryDefinition.java @@ -26,7 +26,7 @@ import com.sun.star.lang.IllegalArgumentException; public class QueryDefinition { - private XPropertySet m_queryDef; + private final XPropertySet m_queryDef; public QueryDefinition( XPropertySet _queryDef ) { diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java b/dbaccess/qa/complex/dbaccess/RowSet.java index 66749fb30233..ad0968a3d3eb 100644 --- a/dbaccess/qa/complex/dbaccess/RowSet.java +++ b/dbaccess/qa/complex/dbaccess/RowSet.java @@ -73,9 +73,9 @@ public class RowSet extends TestCase private class ResultSetMovementStress implements Runnable { - private XResultSet m_resultSet; - private XRow m_row; - private int m_id; + private final XResultSet m_resultSet; + private final XRow m_row; + private final int m_id; private ResultSetMovementStress(XResultSet _resultSet, int _id) throws java.lang.Exception { diff --git a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java index 86b168abc55d..f7499ceef5f7 100644 --- a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java +++ b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java @@ -49,13 +49,13 @@ public class OptionsEventHandler { static private final String __serviceName = "com.sun.star.comp.extensionoptions.OptionsEventHandler"; - private XComponentContext m_cmpCtx; + private final XComponentContext m_cmpCtx; private XNameAccess m_xAccessLeaves; /**Names of supported options pages. */ - private String[] m_arWindowNames = { + private final String[] m_arWindowNames = { "Writer1", "Writer2", "Writer3", "Calc1", "Calc2", "Calc3", "Draw1", "Draw2", "Draw3", "Node1_1", "Node1_2", "Node1_3", "Node2_1", "Node2_2", "Node2_3", "Node3_1", "Node3_2", "Node3_3"}; @@ -63,7 +63,7 @@ public class OptionsEventHandler { /**Names of the controls which are supported by this handler. All these *controls must have a "Text" property. */ - private String[] m_arStringControls = { + private final String[] m_arStringControls = { "String0", "String1", "String2", "String3", "String4"}; public _OptionsEventHandler(XComponentContext xCompContext) { diff --git a/extensions/qa/integration/extensions/ComponentFactory.java b/extensions/qa/integration/extensions/ComponentFactory.java index 170e19a43667..ec848c4dfb06 100644 --- a/extensions/qa/integration/extensions/ComponentFactory.java +++ b/extensions/qa/integration/extensions/ComponentFactory.java @@ -24,7 +24,7 @@ import java.lang.reflect.Constructor; public class ComponentFactory implements XSingleComponentFactory { - private Class m_handlerClass; + private final Class m_handlerClass; private Constructor m_defaultConstructor; private Constructor m_initConstructor; diff --git a/extensions/qa/integration/extensions/ConsoleWait.java b/extensions/qa/integration/extensions/ConsoleWait.java index b68290c83acd..bda281d2902b 100644 --- a/extensions/qa/integration/extensions/ConsoleWait.java +++ b/extensions/qa/integration/extensions/ConsoleWait.java @@ -23,14 +23,14 @@ import com.sun.star.lang.XComponent; public class ConsoleWait implements com.sun.star.lang.XEventListener { - private Object m_disposable; + private final Object m_disposable; /** a helper class which waits for a console ENTER key event in a dedicated thread, and notifies a ConsoleWait object if this event happened */ private class WaitForEnter extends java.lang.Thread { - private ConsoleWait m_toNotify; + private final ConsoleWait m_toNotify; private boolean m_done; public WaitForEnter( ConsoleWait _toNotify ) diff --git a/extensions/qa/integration/extensions/HelpTextProvider.java b/extensions/qa/integration/extensions/HelpTextProvider.java index 73cda71eef2a..8bd6596bc9b5 100644 --- a/extensions/qa/integration/extensions/HelpTextProvider.java +++ b/extensions/qa/integration/extensions/HelpTextProvider.java @@ -15,13 +15,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * HelpTextProvider.java - * - * Created on 16. November 2006, 09:44 - */ - package integration.extensions; import com.sun.star.inspection.XObjectInspectorUI; @@ -33,7 +26,7 @@ import com.sun.star.lang.NoSupportException; */ public class HelpTextProvider implements XPropertyControlObserver { - private XObjectInspectorUI m_inspectorUI; + private final XObjectInspectorUI m_inspectorUI; /** * Creates a new instance of HelpTextProvider diff --git a/extensions/qa/integration/extensions/ServicesHandler.java b/extensions/qa/integration/extensions/ServicesHandler.java index 87ebb270ae84..516f2a25cc06 100644 --- a/extensions/qa/integration/extensions/ServicesHandler.java +++ b/extensions/qa/integration/extensions/ServicesHandler.java @@ -26,13 +26,13 @@ import com.sun.star.lang.XServiceInfo; public class ServicesHandler implements XPropertyHandler { - private XComponentContext m_context; + private final XComponentContext m_context; private String[] m_supportedServices; private class ClickHandler implements com.sun.star.awt.XActionListener { XComponentContext m_context; - private String m_serviceName; + private final String m_serviceName; public ClickHandler( XComponentContext _context, String _serviceName ) { diff --git a/filter/qa/complex/filter/detection/typeDetection/Helper.java b/filter/qa/complex/filter/detection/typeDetection/Helper.java index 83026fd75997..e8e5a8171086 100644 --- a/filter/qa/complex/filter/detection/typeDetection/Helper.java +++ b/filter/qa/complex/filter/detection/typeDetection/Helper.java @@ -53,17 +53,17 @@ public class Helper { * @member m_param the test parameters */ - private LogWriter m_log = null; + private final LogWriter m_log; - private String m_sTestDocPath = null; + private final String m_sTestDocPath; - private ArrayList<ArrayList<String>> m_vFiles = null; + private final ArrayList<ArrayList<String>> m_vFiles; - private HashMap<String,String> m_hFileURLs = new HashMap<String,String>(); + private final HashMap<String,String> m_hFileURLs = new HashMap<String,String>(); - private HashMap<String,String> m_hFileTypes = new HashMap<String,String>(); + private final HashMap<String,String> m_hFileTypes = new HashMap<String,String>(); - private TestParameters m_param = null; + private final TestParameters m_param; /** * construct a new instance of this class diff --git a/forms/qa/integration/forms/BooleanValidator.java b/forms/qa/integration/forms/BooleanValidator.java index 8201fe99f5ae..9d85a86161cf 100644 --- a/forms/qa/integration/forms/BooleanValidator.java +++ b/forms/qa/integration/forms/BooleanValidator.java @@ -15,20 +15,13 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -/* - * BooleanValidator.java - * - * Created on 10. Maerz 2004, 16:27 - */ - package integration.forms; import com.sun.star.uno.AnyConverter; public class BooleanValidator extends integration.forms.ControlValidator { - private boolean m_preventChecked; + private final boolean m_preventChecked; /** Creates a new instance of BooleanValidator */ public BooleanValidator( boolean preventChecked ) diff --git a/forms/qa/integration/forms/DocumentHelper.java b/forms/qa/integration/forms/DocumentHelper.java index a86bc6bca40e..64caf0a152e6 100644 --- a/forms/qa/integration/forms/DocumentHelper.java +++ b/forms/qa/integration/forms/DocumentHelper.java @@ -46,7 +46,7 @@ import com.sun.star.util.XModifiable; */ public class DocumentHelper { - private XMultiServiceFactory m_orb; + private final XMultiServiceFactory m_orb; private XComponent m_documentComponent; /* ================================================================== */ diff --git a/forms/qa/integration/forms/DocumentViewHelper.java b/forms/qa/integration/forms/DocumentViewHelper.java index 5c82fa40b51e..90aa18a39636 100644 --- a/forms/qa/integration/forms/DocumentViewHelper.java +++ b/forms/qa/integration/forms/DocumentViewHelper.java @@ -41,9 +41,9 @@ import org.openoffice.xforms.XMLDocument; */ public class DocumentViewHelper { - private XMultiServiceFactory m_orb; - private XController m_controller; - private DocumentHelper m_document; + private final XMultiServiceFactory m_orb; + private final XController m_controller; + private final DocumentHelper m_document; /* ------------------------------------------------------------------ */ final protected XController getController() diff --git a/forms/qa/integration/forms/FormComponent.java b/forms/qa/integration/forms/FormComponent.java index eb7467a55e59..301472760f29 100644 --- a/forms/qa/integration/forms/FormComponent.java +++ b/forms/qa/integration/forms/FormComponent.java @@ -28,11 +28,11 @@ import com.sun.star.lang.XServiceInfo; public class FormComponent { - private Object m_component; - private XNameAccess m_nameAccess; - private XIndexAccess m_indexAccess; - private XChild m_child; - private XNamed m_named; + private final Object m_component; + private final XNameAccess m_nameAccess; + private final XIndexAccess m_indexAccess; + private final XChild m_child; + private final XNamed m_named; /* ------------------------------------------------------------------ */ private FormComponent() diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java index e7c33a0a61f2..06806897d00a 100644 --- a/forms/qa/integration/forms/FormLayer.java +++ b/forms/qa/integration/forms/FormLayer.java @@ -36,7 +36,7 @@ import com.sun.star.drawing.XDrawPage; public class FormLayer { - private DocumentHelper m_document; + private final DocumentHelper m_document; private XDrawPage m_page; /* ------------------------------------------------------------------ */ diff --git a/forms/qa/integration/forms/ImageComparison.java b/forms/qa/integration/forms/ImageComparison.java index 76784c36991c..034f4e550efc 100644 --- a/forms/qa/integration/forms/ImageComparison.java +++ b/forms/qa/integration/forms/ImageComparison.java @@ -27,9 +27,9 @@ package integration.forms; public final class ImageComparison implements com.sun.star.awt.XImageConsumer { - private byte[] m_referenceBytes; + private final byte[] m_referenceBytes; private int m_referencePosition; - private Object m_notifyDone; + private final Object m_notifyDone; public boolean imagesEqual( ) { diff --git a/forms/qa/integration/forms/SingleControlValidation.java b/forms/qa/integration/forms/SingleControlValidation.java index a24639b5d09f..0873d34ac8ae 100644 --- a/forms/qa/integration/forms/SingleControlValidation.java +++ b/forms/qa/integration/forms/SingleControlValidation.java @@ -24,14 +24,14 @@ import com.sun.star.form.validation.*; public class SingleControlValidation implements XFormComponentValidityListener { - private DocumentHelper m_document; /// our current test document - private FormLayer m_formLayer; /// quick access to the form layer + private final DocumentHelper m_document; /// our current test document + private final FormLayer m_formLayer; /// quick access to the form layer private XPropertySet m_inputField; private XPropertySet m_inputLabel; private XPropertySet m_statusField; private XPropertySet m_explanationField; - private XValidator m_validator; + private final XValidator m_validator; /* ------------------------------------------------------------------ */ public SingleControlValidation( DocumentHelper document, int columnPos, int rowPos, String formComponentService, XValidator validator ) diff --git a/forms/qa/integration/forms/TableCellTextBinding.java b/forms/qa/integration/forms/TableCellTextBinding.java index 475ceb6fbd2a..70649602039f 100644 --- a/forms/qa/integration/forms/TableCellTextBinding.java +++ b/forms/qa/integration/forms/TableCellTextBinding.java @@ -43,12 +43,12 @@ public class TableCellTextBinding implements com.sun.star.form.binding.XValueBinding, com.sun.star.util.XModifyBroadcaster { - private XTextRange m_cellText; + private final XTextRange m_cellText; private Object m_writeSignal; private String m_newCellText; private String m_lastKnownCellText; private boolean m_haveNewCellText; - private java.util.List<com.sun.star.util.XModifyListener> m_listeners; + private final java.util.List<com.sun.star.util.XModifyListener> m_listeners; /** Creates a new instance of TableCellTextBinding */ public TableCellTextBinding( XCell cell ) diff --git a/forms/qa/integration/forms/WaitForInput.java b/forms/qa/integration/forms/WaitForInput.java index 4c56b6eda746..c04c4dbe39d5 100644 --- a/forms/qa/integration/forms/WaitForInput.java +++ b/forms/qa/integration/forms/WaitForInput.java @@ -19,7 +19,7 @@ package integration.forms; class WaitForInput extends java.lang.Thread { - private Object m_aToNotify; + private final Object m_aToNotify; private boolean m_bDone; public WaitForInput( Object aToNotify ) diff --git a/forms/qa/org/openoffice/xforms/Instance.java b/forms/qa/org/openoffice/xforms/Instance.java index e60a8e4ec448..d98c647a959f 100644 --- a/forms/qa/org/openoffice/xforms/Instance.java +++ b/forms/qa/org/openoffice/xforms/Instance.java @@ -26,8 +26,8 @@ import java.util.NoSuchElementException; public class Instance { - private Model m_model; - private XDocument m_domInstance; + private final Model m_model; + private final XDocument m_domInstance; protected Instance( Model _model, XDocument _domInstance ) { diff --git a/forms/qa/org/openoffice/xforms/Model.java b/forms/qa/org/openoffice/xforms/Model.java index a573fe5bf974..37c3915b2a07 100644 --- a/forms/qa/org/openoffice/xforms/Model.java +++ b/forms/qa/org/openoffice/xforms/Model.java @@ -26,9 +26,9 @@ import com.sun.star.xml.dom.XNode; public class Model { - private XModel m_model; - private XPropertySet m_modelProps; - private XFormsUIHelper1 m_helper; + private final XModel m_model; + private final XPropertySet m_modelProps; + private final XFormsUIHelper1 m_helper; protected Model( Object _model ) { diff --git a/framework/qa/complex/XUserInputInterception/EventTest.java b/framework/qa/complex/XUserInputInterception/EventTest.java index 350a2216e5d1..0efb10c2dc9a 100644 --- a/framework/qa/complex/XUserInputInterception/EventTest.java +++ b/framework/qa/complex/XUserInputInterception/EventTest.java @@ -406,11 +406,11 @@ public class EventTest { * 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/framework/qa/complex/accelerators/KeyMapping.java b/framework/qa/complex/accelerators/KeyMapping.java index 0eb23b08b452..79e562a39a0b 100644 --- a/framework/qa/complex/accelerators/KeyMapping.java +++ b/framework/qa/complex/accelerators/KeyMapping.java @@ -42,8 +42,8 @@ class CodeHashMap extends HashMap<Short,String> public class KeyMapping { - private IdentifierHashMap aIdentifierHashMap; - private CodeHashMap aCodeHashMap; + private final IdentifierHashMap aIdentifierHashMap; + private final CodeHashMap aCodeHashMap; public KeyMapping() { diff --git a/framework/qa/complex/contextMenuInterceptor/ContextMenuInterceptor.java b/framework/qa/complex/contextMenuInterceptor/ContextMenuInterceptor.java index d3430486560c..fa3a999ad25c 100644 --- a/framework/qa/complex/contextMenuInterceptor/ContextMenuInterceptor.java +++ b/framework/qa/complex/contextMenuInterceptor/ContextMenuInterceptor.java @@ -25,7 +25,7 @@ import com.sun.star.uno.UnoRuntime; public class ContextMenuInterceptor implements XContextMenuInterceptor { - private com.sun.star.awt.XBitmap myBitmap; + private final com.sun.star.awt.XBitmap myBitmap; public ContextMenuInterceptor(com.sun.star.awt.XBitmap aBitmap) { diff --git a/framework/qa/complex/desktop/DesktopTerminate.java b/framework/qa/complex/desktop/DesktopTerminate.java index 82e753e71e31..347eb749b56f 100644 --- a/framework/qa/complex/desktop/DesktopTerminate.java +++ b/framework/qa/complex/desktop/DesktopTerminate.java @@ -38,7 +38,7 @@ public class DesktopTerminate { private XMultiServiceFactory xMSF; - private int iOfficeCloseTime = 1000; + private final int iOfficeCloseTime = 1000; /** * Test if all available document types change the diff --git a/framework/qa/complex/framework/autosave/AutoSave.java b/framework/qa/complex/framework/autosave/AutoSave.java index 33effb441304..f2a937e0c67f 100644 --- a/framework/qa/complex/framework/autosave/AutoSave.java +++ b/framework/qa/complex/framework/autosave/AutoSave.java @@ -66,7 +66,7 @@ public class AutoSave { private XDispatch m_xAutoSave; private URL m_aRegistration; - private Protocol m_aLog; + private final Protocol m_aLog; private AutoSaveListener(XMultiServiceFactory xSMGR , XDispatch xAutoSave, diff --git a/framework/qa/complex/framework/autosave/ConfigHelper.java b/framework/qa/complex/framework/autosave/ConfigHelper.java index 204be38935bc..3e7fc394fc19 100644 --- a/framework/qa/complex/framework/autosave/ConfigHelper.java +++ b/framework/qa/complex/framework/autosave/ConfigHelper.java @@ -27,7 +27,7 @@ import com.sun.star.util.*; class ConfigHelper { - private XHierarchicalNameAccess m_xConfig = null; + private final XHierarchicalNameAccess m_xConfig; public ConfigHelper(XComponentContext context, diff --git a/framework/qa/complex/framework/autosave/Protocol.java b/framework/qa/complex/framework/autosave/Protocol.java index ac2a61dce79b..6748fc3ad6b1 100644 --- a/framework/qa/complex/framework/autosave/Protocol.java +++ b/framework/qa/complex/framework/autosave/Protocol.java @@ -139,9 +139,9 @@ public class Protocol extends JComponent * @member m_nWarnings count warnings in protocol * @member m_nTestMarks count test marker in protocol */ - private int m_nMode ; - private int m_nFilter ; - private String m_sFileName ; + private final int m_nMode ; + private final int m_nFilter ; + private final String m_sFileName ; private long m_nLine ; private long m_nScope ; private long m_nErrors ; @@ -158,15 +158,15 @@ public class Protocol extends JComponent private class ProtocolLine { /// the line number of this protocol line (size of the vector of all protocol lines cn be used to count such lines!) - private long m_nLine; + private final long m_nLine; /// deepness of the current scope - private long m_nScope; + private final long m_nScope; /// mark line as an error, warning, data entry ... (see const definitions before) - private int m_nType; + private final int m_nType; /// of course, we have to know the logged message too :-) - private String m_sMessage; + private final String m_sMessage; /// and it can be useful to know the current time, when this line was created - private Timestamp m_aStamp; + private final Timestamp m_aStamp; /** ctor for fast initializing of such line */ private ProtocolLine( long nLine , diff --git a/framework/qa/complex/framework/recovery/CrashThread.java b/framework/qa/complex/framework/recovery/CrashThread.java index 437b1309605c..8a16f83c6aa5 100644 --- a/framework/qa/complex/framework/recovery/CrashThread.java +++ b/framework/qa/complex/framework/recovery/CrashThread.java @@ -33,8 +33,8 @@ import com.sun.star.util.XURLTransformer; * is nopt longer available. */ public class CrashThread extends Thread { - private XComponent xDoc = null; - private XMultiServiceFactory msf = null; + private final XComponent xDoc; + private final XMultiServiceFactory msf; public CrashThread(XComponent xDoc, XMultiServiceFactory msf) { this.xDoc = xDoc; diff --git a/framework/qa/complex/framework/recovery/KlickButtonThread.java b/framework/qa/complex/framework/recovery/KlickButtonThread.java index e5683efc6b6d..0b7e2cef67b6 100644 --- a/framework/qa/complex/framework/recovery/KlickButtonThread.java +++ b/framework/qa/complex/framework/recovery/KlickButtonThread.java @@ -27,9 +27,9 @@ import util.UITools; * is nopt longer available. */ public class KlickButtonThread extends Thread { - private XWindow xWindow = null; - private XMultiServiceFactory xMSF = null; - private String buttonName = null; + private final XWindow xWindow; + private final XMultiServiceFactory xMSF; + private final String buttonName; public KlickButtonThread(XMultiServiceFactory xMSF, XWindow xWindow, String buttonName) { this.xWindow = xWindow; diff --git a/framework/qa/complex/framework/recovery/RecoveryTest.java b/framework/qa/complex/framework/recovery/RecoveryTest.java index cfb767790b6d..b85f519078f5 100644 --- a/framework/qa/complex/framework/recovery/RecoveryTest.java +++ b/framework/qa/complex/framework/recovery/RecoveryTest.java @@ -69,7 +69,7 @@ public class RecoveryTest extends ComplexTestCase { * and the values are com sun.star.awt.Rectangle. * @see com.sun.star.awt.Rectangle */ - private HashMap<String, Rectangle> windowsPosSize = new HashMap<String, Rectangle>(); + private final HashMap<String, Rectangle> windowsPosSize = new HashMap<String, Rectangle>(); /** * A function to tell the framework, which test functions are available. diff --git a/framework/qa/complex/imageManager/_XComponent.java b/framework/qa/complex/imageManager/_XComponent.java index 54ac164a6f34..8b7cdb5404e7 100644 --- a/framework/qa/complex/imageManager/_XComponent.java +++ b/framework/qa/complex/imageManager/_XComponent.java @@ -40,7 +40,7 @@ public class _XComponent { private static XComponent oObj = null; private XComponent altDispose = null; - private TestParameters tEnv = null; + private final TestParameters tEnv; private boolean listenerDisposed[] = new boolean[2]; private String[] Loutput = new String[2]; @@ -49,8 +49,8 @@ public class _XComponent { * on <code>dispose</code> call. */ private class MyEventListener implements XEventListener { - private int number = 0; - private String message = null; + private final int number; + private final String message; private MyEventListener(int number, String message) { this.message = message; this.number = number; @@ -61,8 +61,8 @@ public class _XComponent { } } - private XEventListener listener1 = new MyEventListener(0, "EV1"); - private XEventListener listener2 = new MyEventListener(1, "EV2"); + private final XEventListener listener1 = new MyEventListener(0, "EV1"); + private final XEventListener listener2 = new MyEventListener(1, "EV2"); public _XComponent(TestParameters tEnv, XComponent oObj) { this.tEnv = tEnv; diff --git a/framework/qa/complex/imageManager/_XImageManager.java b/framework/qa/complex/imageManager/_XImageManager.java index 96ea2a3f9ead..42d8055c4679 100644 --- a/framework/qa/complex/imageManager/_XImageManager.java +++ b/framework/qa/complex/imageManager/_XImageManager.java @@ -31,7 +31,7 @@ public class _XImageManager { private String[]imageNames = null; private XGraphic[] xGraphicArray = null; - private XImageManager oObj; + private final XImageManager oObj; public _XImageManager( TestParameters tEnv, XImageManager oObj) { this.oObj = oObj; diff --git a/framework/qa/complex/imageManager/_XInitialization.java b/framework/qa/complex/imageManager/_XInitialization.java index fce31d4a3835..14cab34d4ca0 100644 --- a/framework/qa/complex/imageManager/_XInitialization.java +++ b/framework/qa/complex/imageManager/_XInitialization.java @@ -40,7 +40,7 @@ import lib.TestParameters; public class _XInitialization { - private TestParameters tEnv = null; + private final TestParameters tEnv; private static XInitialization oObj = null; public _XInitialization(TestParameters tEnv, XInitialization oObj) { diff --git a/framework/qa/complex/imageManager/_XUIConfiguration.java b/framework/qa/complex/imageManager/_XUIConfiguration.java index b3076c6077d1..486989535c5e 100644 --- a/framework/qa/complex/imageManager/_XUIConfiguration.java +++ b/framework/qa/complex/imageManager/_XUIConfiguration.java @@ -28,8 +28,8 @@ import lib.TestParameters; public class _XUIConfiguration { - private TestParameters tEnv = null; - private XUIConfiguration oObj; + private final TestParameters tEnv; + private final XUIConfiguration oObj; private XUIConfigurationListenerImpl xListener = null; public interface XUIConfigurationListenerImpl diff --git a/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java b/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java index aa00c59b57c7..23735a1797bc 100644 --- a/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java +++ b/framework/qa/complex/imageManager/_XUIConfigurationPersistence.java @@ -27,8 +27,8 @@ import lib.TestParameters; public class _XUIConfigurationPersistence { - private TestParameters tEnv = null; - private XUIConfigurationPersistence oObj; + private final TestParameters tEnv; + private final XUIConfigurationPersistence oObj; private XStorage xStore = null; public _XUIConfigurationPersistence(TestParameters tEnv, XUIConfigurationPersistence oObj) { diff --git a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java index 0326ffa77464..9d327ec8a8ce 100644 --- a/javaunohelper/com/sun/star/comp/helper/ComponentContext.java +++ b/javaunohelper/com/sun/star/comp/helper/ComponentContext.java @@ -36,7 +36,7 @@ import java.util.Map; class Disposer implements XEventListener { - private XComponent m_xComp; + private final XComponent m_xComp; Disposer( XComponent xComp ) diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java index 1fa4286214c4..feaca77cc9a6 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/InputStreamToXInputStreamAdapter.java @@ -34,7 +34,7 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream { /** * Internal store to the InputStream */ - private InputStream iIn; + private final InputStream iIn; /** * Constructor. diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java index 432cfdc0baed..c77c57b5adc1 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java @@ -35,7 +35,7 @@ public final class XInputStreamToInputStreamAdapter extends InputStream { /** * Internal handle to the XInputStream */ - private XInputStream xin; + private final XInputStream xin; /** * Constructor. diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java index f8e738d0d8f8..d8f5740eb32a 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java @@ -31,7 +31,7 @@ public final class XOutputStreamToByteArrayAdapter extends ComponentBase implements XOutputStream { - private int initialSize = 100240; // 10 kb + private final int initialSize = 100240; // 10 kb private int size = 0; private int position = 0; private boolean externalBuffer = false; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java index ca0bf84212c2..89cf42e3703a 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/Factory.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/Factory.java @@ -116,9 +116,9 @@ public class Factory } - private String m_impl_name; - private String [] m_supported_services; - private Class<?> m_impl_class; + private final String m_impl_name; + private final String [] m_supported_services; + private final Class<?> m_impl_class; private java.lang.reflect.Method m_method; private java.lang.reflect.Constructor m_ctor; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java index 25c0ff997001..6ba3a4892c87 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java @@ -26,7 +26,7 @@ import java.util.Iterator; public class MultiTypeInterfaceContainer { - private Map<Object,InterfaceContainer> map= new HashMap<Object,InterfaceContainer>(); + private final Map<Object,InterfaceContainer> map= new HashMap<Object,InterfaceContainer>(); /** only returns types which have at least one value in InterfaceContainer * return value can contain an element null, if someone called diff --git a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java index 95d401440b3d..ca5e7a0aadd2 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/UnoUrl.java @@ -57,15 +57,15 @@ public class UnoUrl { private static final String VALUE_CHAR_SET = "!$&'()*+-./:?@_~"; private static final String OID_CHAR_SET = VALUE_CHAR_SET + ",="; - private UnoUrlPart connection; - private UnoUrlPart protocol; - private String rootOid; + private final UnoUrlPart connection; + private final UnoUrlPart protocol; + private final String rootOid; static private class UnoUrlPart { - private String partTypeName; - private HashMap<String,String> partParameters; - private String uninterpretedParameterString; + private final String partTypeName; + private final HashMap<String,String> partParameters; + private final String uninterpretedParameterString; public UnoUrlPart( String uninterpretedParameterString, diff --git a/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java b/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java index 0239959f619b..67e01ac3276d 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/WeakAdapter.java @@ -33,9 +33,9 @@ import java.util.LinkedList; public class WeakAdapter implements XAdapter { // references the XWeak implementation - private WeakReference<Object> m_weakRef; + private final WeakReference<Object> m_weakRef; // contains XReference objects registered by addReference - private List<XReference> m_xreferenceList; + private final List<XReference> m_xreferenceList; /** *@param component the object that is to be held weak diff --git a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java index 5a7e91c77fe5..76058e95a6b4 100644 --- a/jurt/com/sun/star/comp/urlresolver/UrlResolver.java +++ b/jurt/com/sun/star/comp/urlresolver/UrlResolver.java @@ -50,7 +50,7 @@ public class UrlResolver { static public class _UrlResolver implements XUnoUrlResolver { static private final String __serviceName = "com.sun.star.bridge.UnoUrlResolver"; - private XMultiServiceFactory _xMultiServiceFactory; + private final XMultiServiceFactory _xMultiServiceFactory; public _UrlResolver(XMultiServiceFactory xMultiServiceFactory) { _xMultiServiceFactory = xMultiServiceFactory; diff --git a/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java b/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java index b652aaf130c0..24d1572f866c 100644 --- a/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java +++ b/jurt/com/sun/star/lib/uno/environments/remote/ThreadId.java @@ -101,10 +101,9 @@ public final class ThreadId { return id; } - private static final String PREFIX - = "java:" + UnoRuntime.getUniqueKey() + ":"; + private static final String PREFIX = "java:" + UnoRuntime.getUniqueKey() + ":"; private static BigInteger count = BigInteger.ZERO; - private byte[] id; + private final byte[] id; private int hash = 0; } diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java index c9879c099e61..c40f2c1ec258 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/behavior/DEGTBehavior.java @@ -35,7 +35,7 @@ import net.adaptivebox.problem.*; import net.adaptivebox.space.*; public class DEGTBehavior extends AbsGTBehavior implements ILibEngine { - private int DVNum = 2; //Number of differential vectors, normally be 1 or 2 + private final int DVNum = 2; //Number of differential vectors, normally be 1 or 2 public double FACTOR = 0.5; //scale constant: (0, 1.2], normally be 0.5 public double CR = 0.9; //crossover constant: [0, 1], normally be 0.1 or 0.9 diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java index b61046d34d92..1ad1adefd08c 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/encode/EvalElement.java @@ -25,7 +25,7 @@ import net.adaptivebox.global.*; public class EvalElement { //The weight for each response (target) - private double weight = 1; + private final double weight = 1; /** * The expected range of the response value, forms the following objective: * diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java index ae8d4d130f8c..2d9f55fc2ac4 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/goodness/ACRComparator.java @@ -36,18 +36,18 @@ import net.adaptivebox.global.*; public class ACRComparator implements IGoodnessCompareEngine, IUpdateCycleEngine { - private Library socialPool; + private final Library socialPool; private double epsilon_t = 0; - private double RU = 0.75; - private double RL = 0.25; - private double BETAF = 0.618; - private double BETAL = 0.618; - private double BETAU = 1.382; + private final double RU = 0.75; + private final double RL = 0.25; + private final double BETAF = 0.618; + private final double BETAL = 0.618; + private final double BETAU = 1.382; - private double T = -1; + private final double T; - private double TthR = 0.5; + private final double TthR = 0.5; public ACRComparator(Library lib, int T) { socialPool = lib; diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java index 6b6574bcc081..d4c202c989fc 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/Library.java @@ -29,7 +29,7 @@ import net.adaptivebox.goodness.*; import net.adaptivebox.problem.*; public class Library { - private SearchPoint[] libPoints = new SearchPoint[0]; + private final SearchPoint[] libPoints; private int gIndex = -1; public Library(SearchPoint[] points){ diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java index ea37e1e5cd0b..dbd472f043e3 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/knowledge/SearchPoint.java @@ -27,7 +27,7 @@ public class SearchPoint extends BasicPoint implements IEncodeEngine { //store the encode information for goodness evaluation //encodeInfo[0]: the sum of constraints (if it equals to 0, then be a feasible point) //encodeInfo[1]: the value of objective function - private double[] encodeInfo = new double[2]; + private final double[] encodeInfo = new double[2]; private double objectiveValue; public SearchPoint(int dim) { diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java index 603648e8428d..bc32c1c8d78b 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/problem/ProblemEncoder.java @@ -33,14 +33,14 @@ import net.adaptivebox.knowledge.*; public abstract class ProblemEncoder { //Store the calculated results for the responses - private double[] tempResponseSet; //temp values - private double[] tempLocation; //temp values + private final double[] tempResponseSet; //temp values + private final double[] tempLocation; //temp values //the search space (S) - private DesignSpace designSpace = null; + private final DesignSpace designSpace; // For evaluate the response vector into encoded vector double[2] - private EvalStruct evalStruct = null; + private final EvalStruct evalStruct; protected ProblemEncoder(int paramNum, int targetNum) throws Exception { designSpace = new DesignSpace(paramNum); diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java index 2bebff6f7fda..b473ae0a3807 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/sco/SCAgent.java @@ -48,9 +48,9 @@ public class SCAgent { private IGoodnessCompareEngine specComparator; //the coefficients of SCAgent - private int TaoB = 2; + private final int TaoB = 2; //The early version set TaoW as the size of external library (NL), but 4 is often enough - private int TaoW = 4; + private final int TaoW = 4; //The referred external library private Library externalLib; diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java index 1cf1b8592a44..a590a69742f7 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/space/BasicPoint.java @@ -22,7 +22,7 @@ package net.adaptivebox.space; public class BasicPoint implements Cloneable, ILocationEngine { //store the location information in the search space (S) - private double[] location; + private final double[] location; public BasicPoint(int dim) { location = new double[dim]; diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java index 9d779afe7225..2d93dca6e4bf 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseEvolutionarySolver.java @@ -61,8 +61,8 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver { } private class Variable { - private CellMap CellMap; - private int OriginalVariable; + private final CellMap CellMap; + private final int OriginalVariable; private double MinValue; private double MaxValue; private double Granularity; @@ -78,8 +78,8 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver { private class CalcProblemEncoder extends ProblemEncoder { - private ArrayList<Variable> m_variables; - private ArrayList<ExtSolverConstraint> m_constraints; + private final ArrayList<Variable> m_variables; + private final ArrayList<ExtSolverConstraint> m_constraints; private CalcProblemEncoder(ArrayList<Variable> variables, ArrayList<ExtSolverConstraint> constraints) throws Exception { @@ -152,19 +152,19 @@ public abstract class BaseEvolutionarySolver extends BaseNLPSolver { protected double m_toleratedMin; protected double m_toleratedMax; - private ArrayList<Variable> m_variables = new ArrayList<Variable>(); + private final ArrayList<Variable> m_variables = new ArrayList<Variable>(); //properties protected PropertyInfo<Integer> m_swarmSize = new PropertyInfo<Integer>("SwarmSize", 70, "Size of Swam"); protected PropertyInfo<Integer> m_librarySize = new PropertyInfo<Integer>("LibrarySize", 210, "Size of Library"); protected PropertyInfo<Integer> m_learningCycles = new PropertyInfo<Integer>("LearningCycles", 2000, "Learning Cycles"); - private PropertyInfo<Boolean> m_guessVariableRange = new PropertyInfo<Boolean>("GuessVariableRange", true, "Variable Bounds Guessing"); - private PropertyInfo<Double> m_variableRangeThreshold = new PropertyInfo<Double>("VariableRangeThreshold", 3.0, "Variable Bounds Threshold (when guessing)"); //to approximate the variable bounds - private PropertyInfo<Boolean> m_useACRComperator = new PropertyInfo<Boolean>("UseACRComparator", false, "Use ACR Comparator (instead of BCH)"); - private PropertyInfo<Boolean> m_useRandomStartingPoint = new PropertyInfo<Boolean>("UseRandomStartingPoint", false, "Use Random starting point"); + private final PropertyInfo<Boolean> m_guessVariableRange = new PropertyInfo<Boolean>("GuessVariableRange", true, "Variable Bounds Guessing"); + private final PropertyInfo<Double> m_variableRangeThreshold = new PropertyInfo<Double>("VariableRangeThreshold", 3.0, "Variable Bounds Threshold (when guessing)"); //to approximate the variable bounds + private final PropertyInfo<Boolean> m_useACRComperator = new PropertyInfo<Boolean>("UseACRComparator", false, "Use ACR Comparator (instead of BCH)"); + private final PropertyInfo<Boolean> m_useRandomStartingPoint = new PropertyInfo<Boolean>("UseRandomStartingPoint", false, "Use Random starting point"); protected PropertyInfo<Integer> m_required = new PropertyInfo<Integer>("StagnationLimit", 70, "Stagnation Limit"); protected PropertyInfo<Double> m_tolerance = new PropertyInfo<Double>("Tolerance", 1e-6, "Stagnation Tolerance"); - private PropertyInfo<Boolean> m_enhancedSolverStatus = new PropertyInfo<Boolean>("EnhancedSolverStatus", true, "Show enhanced solver status"); + private final PropertyInfo<Boolean> m_enhancedSolverStatus = new PropertyInfo<Boolean>("EnhancedSolverStatus", true, "Show enhanced solver status"); protected IEvolutionarySolverStatusDialog m_solverStatusDialog; diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java index f7fc741fc6bf..716a79b79438 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java @@ -100,15 +100,15 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver return m_serviceNames; } - private PropertyInfo<Double> m_agentSwitchRate = new PropertyInfo<Double>("AgentSwitchRate", 0.5, "Agent Switch Rate (DE Probability)"); + private final PropertyInfo<Double> m_agentSwitchRate = new PropertyInfo<Double>("AgentSwitchRate", 0.5, "Agent Switch Rate (DE Probability)"); // --DE - private PropertyInfo<Double> m_factor = new PropertyInfo<Double>("DEFactor", 0.5, "DE: Scaling Factor (0-1.2)"); - private PropertyInfo<Double> m_CR = new PropertyInfo<Double>("DECR", 0.9, "DE: Crossover Probability (0-1)"); + private final PropertyInfo<Double> m_factor = new PropertyInfo<Double>("DEFactor", 0.5, "DE: Scaling Factor (0-1.2)"); + private final PropertyInfo<Double> m_CR = new PropertyInfo<Double>("DECR", 0.9, "DE: Crossover Probability (0-1)"); // --PS - private PropertyInfo<Double> m_c1 = new PropertyInfo<Double>("PSC1", 1.494, "PS: Cognitive Constant"); - private PropertyInfo<Double> m_c2 = new PropertyInfo<Double>("PSC2", 1.494, "PS: Social Constant"); - private PropertyInfo<Double> m_weight = new PropertyInfo<Double>("PSWeight", 0.729, "PS: Constriction Coefficient"); - private PropertyInfo<Double> m_CL = new PropertyInfo<Double>("PSCL", 0.0, "PS: Mutation Probability (0-0.005)"); + private final PropertyInfo<Double> m_c1 = new PropertyInfo<Double>("PSC1", 1.494, "PS: Cognitive Constant"); + private final PropertyInfo<Double> m_c2 = new PropertyInfo<Double>("PSC2", 1.494, "PS: Social Constant"); + private final PropertyInfo<Double> m_weight = new PropertyInfo<Double>("PSWeight", 0.729, "PS: Constriction Coefficient"); + private final PropertyInfo<Double> m_CL = new PropertyInfo<Double>("PSCL", 0.0, "PS: Mutation Probability (0-0.005)"); public void solve() { try { diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java index cd3dc0c3c7cb..da8dbb22e997 100644 --- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java +++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java @@ -45,18 +45,18 @@ public class EvolutionarySolverStatusUno extends BaseDialog XActionListener { private int userState; - private Label lblSolutionValue; - private Label lblIteration; - private ProgressBar pbIteration; - private Label lblIterationValue; - private Label lblStagnation; - private ProgressBar pbStagnation; - private Label lblStagnationValue; - private Label lblRuntimeValue; - private Button btnStop; - private Button btnOK; - private Button btnContinue; - private int defaultTextColor; + private final Label lblSolutionValue; + private final Label lblIteration; + private final ProgressBar pbIteration; + private final Label lblIterationValue; + private final Label lblStagnation; + private final ProgressBar pbStagnation; + private final Label lblStagnationValue; + private final Label lblRuntimeValue; + private final Button btnStop; + private final Button btnOK; + private final Button btnContinue; + private final int defaultTextColor; private int maxIterations; private int maxStagnation; diff --git a/odk/examples/DevelopersGuide/Charts/CalcHelper.java b/odk/examples/DevelopersGuide/Charts/CalcHelper.java index 50364bdc0fbd..242e7676853d 100644 --- a/odk/examples/DevelopersGuide/Charts/CalcHelper.java +++ b/odk/examples/DevelopersGuide/Charts/CalcHelper.java @@ -342,7 +342,7 @@ public class CalcHelper private static final String msDataSheetName = "Data"; private static final String msChartSheetName = "Chart"; - private XSpreadsheetDocument maSpreadSheetDoc; + private final XSpreadsheetDocument maSpreadSheetDoc; diff --git a/odk/examples/DevelopersGuide/Charts/ChartHelper.java b/odk/examples/DevelopersGuide/Charts/ChartHelper.java index 043635fe169e..1a79560fa94b 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartHelper.java +++ b/odk/examples/DevelopersGuide/Charts/ChartHelper.java @@ -237,5 +237,5 @@ public class ChartHelper private static final String msChartClassID = "12dcae26-281f-416f-a234-c3086127382e"; - private XModel maContainerDocument; + private final XModel maContainerDocument; } diff --git a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java index 76791e3bb9f9..ed55332e6128 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInCalc.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInCalc.java @@ -409,6 +409,6 @@ public class ChartInCalc // private members - private XChartDocument maChartDocument; - private XDiagram maDiagram; + private final XChartDocument maChartDocument; + private final XDiagram maDiagram; } diff --git a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java index 19e4855461e5..eec3be116244 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInDraw.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInDraw.java @@ -286,6 +286,6 @@ public class ChartInDraw // private members - private XChartDocument maChartDocument; - private XDiagram maDiagram; + private final XChartDocument maChartDocument; + private final XDiagram maDiagram; } diff --git a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java index 124616db46be..940a8cfc056b 100644 --- a/odk/examples/DevelopersGuide/Charts/ChartInWriter.java +++ b/odk/examples/DevelopersGuide/Charts/ChartInWriter.java @@ -155,6 +155,6 @@ public class ChartInWriter // private members - private XChartDocument maChartDocument; - private XDiagram maDiagram; + private final XChartDocument maChartDocument; + private final XDiagram maDiagram; } diff --git a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java index 48108d8b21d1..36e7b3e4ec92 100644 --- a/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java +++ b/odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java @@ -184,7 +184,7 @@ public class ListenAtCalcRangeInDraw implements XChartDataChangeEventListener // __________ private __________ - private XSpreadsheetDocument maSheetDoc; - private XChartDocument maChartDocument; - private XChartData maChartData; + private final XSpreadsheetDocument maSheetDoc; + private final XChartDocument maChartDocument; + private final XChartData maChartData; } diff --git a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java index 9cfeb9e81f1f..190f8214fb03 100644 --- a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java +++ b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java @@ -177,7 +177,7 @@ public class SelectionChangeListener implements XSelectionChangeListener { // __________ private __________ private class MyMessageBox extends Thread{ - private XMultiComponentFactory mMCF; + private final XMultiComponentFactory mMCF; public MyMessageBox(XMultiComponentFactory xMCF){ mMCF = xMCF; @@ -212,6 +212,6 @@ public class SelectionChangeListener implements XSelectionChangeListener { } } - private XChartDocument maChartDocument; - private XComponentContext maContext; + private final XChartDocument maChartDocument; + private final XComponentContext maContext; } diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java index 239296cc30e5..a969253bc9c4 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java +++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java @@ -68,7 +68,7 @@ public class ProtocolHandlerAddon { /** The component context, that gives access to the service manager and all registered services. */ - private XComponentContext m_xCmpCtx; + private final XComponentContext m_xCmpCtx; /** The toolkit, that we can create UNO dialogs. */ diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java index 15589707be4d..cf28e4c5ae86 100644 --- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java +++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java @@ -43,7 +43,7 @@ import com.sun.star.uno.Type; public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB { static final String __serviceName= "com.sun.star.test.SomethingB"; - private Object[] args; + private final Object[] args; public TestComponentB(XComponentContext context, Object[] args) { this.args= args; diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java index e184400d8fb9..083347cb69b9 100644 --- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java +++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java @@ -71,7 +71,7 @@ public class DialogComponent { private static final String __serviceName= "com.sun.star.test.TestDialogHandler"; - private XComponentContext m_xCmpCtx; + private final XComponentContext m_xCmpCtx; private XFrame m_xFrame; private XToolkit m_xToolkit; diff --git a/odk/examples/DevelopersGuide/Config/ConfigExamples.java b/odk/examples/DevelopersGuide/Config/ConfigExamples.java index 2cca38513f99..510425d57e32 100644 --- a/odk/examples/DevelopersGuide/Config/ConfigExamples.java +++ b/odk/examples/DevelopersGuide/Config/ConfigExamples.java @@ -82,10 +82,10 @@ import com.sun.star.util.ChangesEvent; public class ConfigExamples { // The ComponentContext interface of the remote component context - private XComponentContext mxContext = null; + private final XComponentContext mxContext; // The MultiComponentFactory interface of the ServiceManager - private XMultiComponentFactory mxServiceManager = null; + private final XMultiComponentFactory mxServiceManager; // The MultiServiceFactory interface of the ConfigurationProvider private XMultiServiceFactory mxProvider = null; diff --git a/odk/examples/DevelopersGuide/Database/Sales.java b/odk/examples/DevelopersGuide/Database/Sales.java index 1733d21930b0..11a22a4fab86 100644 --- a/odk/examples/DevelopersGuide/Database/Sales.java +++ b/odk/examples/DevelopersGuide/Database/Sales.java @@ -38,7 +38,7 @@ import com.sun.star.sdbc.*; public class Sales { - private XConnection con; + private final XConnection con; public Sales(XConnection connection ) { diff --git a/odk/examples/DevelopersGuide/Database/SalesMan.java b/odk/examples/DevelopersGuide/Database/SalesMan.java index 5aead056c4c6..c88e5c86ab63 100644 --- a/odk/examples/DevelopersGuide/Database/SalesMan.java +++ b/odk/examples/DevelopersGuide/Database/SalesMan.java @@ -38,7 +38,7 @@ import com.sun.star.sdbc.*; public class SalesMan { - private XConnection con; + private final XConnection con; public SalesMan(XConnection connection ) { diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java index fb498591f2ac..ddb263cd938d 100644 --- a/odk/examples/DevelopersGuide/Database/sdbcx.java +++ b/odk/examples/DevelopersGuide/Database/sdbcx.java @@ -44,11 +44,12 @@ import com.sun.star.lang.XMultiServiceFactory; public class sdbcx { - private XMultiServiceFactory xORB; + private final XMultiServiceFactory xORB; private static XConnection con; private XTablesSupplier xTabSup; - public static XMultiServiceFactory rSmgr; + public static XMultiServiceFactory rSmgr; + public static void main(String argv[]) throws java.lang.Exception { try{ diff --git a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java index 61fbf5f6958b..caa62f5220f1 100644 --- a/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java +++ b/odk/examples/DevelopersGuide/GUI/RoadmapItemStateChangeListener.java @@ -39,7 +39,7 @@ import com.sun.star.uno.UnoRuntime; public class RoadmapItemStateChangeListener implements XItemListener { - private com.sun.star.lang.XMultiServiceFactory m_xMSFDialogModel; + private final com.sun.star.lang.XMultiServiceFactory m_xMSFDialogModel; public RoadmapItemStateChangeListener(com.sun.star.lang.XMultiServiceFactory xMSFDialogModel) { m_xMSFDialogModel = xMSFDialogModel; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java index 3f86aeff0581..1acb6eae6a40 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/CustomizeView.java @@ -80,9 +80,9 @@ public class CustomizeView extends JPanel * @member m_aToolBarListener listener for status events of the tool bar * @member m_aObjectBarListener listener for status events of the object bar */ - private JCheckBox m_cbMenuBar ; - private JCheckBox m_cbToolBar ; - private JCheckBox m_cbObjectBar ; + private final JCheckBox m_cbMenuBar ; + private final JCheckBox m_cbToolBar ; + private final JCheckBox m_cbObjectBar ; private StatusListener m_aMenuBarListener ; private StatusListener m_aToolBarListener ; @@ -175,9 +175,9 @@ public class CustomizeView extends JPanel com.sun.star.lang.XEventListener { /// URL, to toogle the requested UI item - private String m_sURL; + private final String m_sURL; /// name of the property which must be used in combination with the URL - private String m_sProp; + private final String m_sProp; /// we must use this frame to dispatch a request private com.sun.star.frame.XFrame m_xFrame; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java index 2a3bad305c94..c6e657c06483 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java @@ -99,10 +99,10 @@ public class DocumentView extends JFrame private CustomizeView maCustomizeView ; private Interceptor maInterceptor ; - private String msName ; + private final String msName; - private JButton mbtSave ; - private JButton mbtExport ; + private final JButton mbtSave; + private final JButton mbtExport; private boolean mbDead ; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java index 2d07f9642d9c..51fba4d12725 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/JavaWindowPeerFake.java @@ -40,7 +40,7 @@ class JavaWindowPeerFake implements com.sun.star.awt.XSystemDependentWindowPeer, com.sun.star.awt.XWindowPeer { - private NativeView maView; + private final NativeView maView; public JavaWindowPeerFake(NativeView aNative) { diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java index cc3b79cf19ea..815355114bc0 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java @@ -74,9 +74,9 @@ class OnewayExecutor extends Thread * called oneyway method) * @member m_lParams list of parameters of the original request */ - private IOnewayLink m_rLink ; - private int m_nRequest ; - private ArrayList<Object> m_lParams ; + private final IOnewayLink m_rLink ; + private final int m_nRequest ; + private final ArrayList<Object> m_lParams ; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java index 02fc79d337e9..038c80ff92f1 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusListener.java @@ -80,9 +80,9 @@ class StatusListener implements com.sun.star.frame.XStatusListener, * @member m_bIsStatusListener indicates if we are currently registered as a listener for status events or not * @member m_bDead there exist more than one way to finish an object of this class - we must know it sometimes */ - private Component m_rControl ; - private String m_sTrueText ; - private String m_sFalseText ; + private final Component m_rControl ; + private final String m_sTrueText ; + private final String m_sFalseText ; private com.sun.star.frame.XDispatch m_xDispatch ; private com.sun.star.frame.XFrame m_xFrame ; private com.sun.star.util.URL m_aURL ; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java index ae7625bfff7e..c4eb32ed4adb 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/StatusView.java @@ -105,11 +105,11 @@ public class StatusView extends JPanel * @member maUnderlineListener threadsafe(!) helper to listen for status event which describe font style underline * @member maItalicListener threadsafe(!) helper to listen for status event which describe font style italic */ - private JLabel m_laFontValue ; - private JLabel m_laSizeValue ; - private JLabel m_laBoldValue ; - private JLabel m_laUnderlineValue ; - private JLabel m_laItalicValue ; + private final JLabel m_laFontValue ; + private final JLabel m_laSizeValue ; + private final JLabel m_laBoldValue ; + private final JLabel m_laUnderlineValue ; + private final JLabel m_laItalicValue ; private StatusListener m_aFontListener ; private StatusListener m_aSizeListener ; diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java index 04e9b771c391..7930f8595601 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java @@ -112,7 +112,7 @@ public class AsciiReplaceFilter * To see the output inside an office environment * use "soffice ...params... >output.txt" */ - private long m_nStart; + private final long m_nStart; private long m_nLast ; private void measure( String sText ) diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java index d821313ca00d..c740bc4d276d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/FilterOptions.java @@ -69,8 +69,8 @@ public class FilterOptions // private members for internal things - private XMultiComponentFactory m_xMCF ; - private XComponentContext m_Ctx ; + private final XMultiComponentFactory m_xMCF; + private final XComponentContext m_Ctx; // interface diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java index e096eb4660b8..e510d7ddf70d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java/FlatXml.java @@ -55,9 +55,9 @@ public class FlatXml implements XImportFilter, XExportFilter, XServiceName, /* * private data members */ - private XMultiServiceFactory m_xServiceFactory; + private final XMultiServiceFactory m_xServiceFactory; private XExtendedDocumentHandler m_xHandler; - private boolean m_bPrettyPrint = true; + private final boolean m_bPrettyPrint = true; static private final String __serviceName = "devguide.officedev.samples.filter.FlatXmlJava"; static private final String __implName = "FlatXml"; diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java index 9c9978da3ac2..1c3489d5be44 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/OneInstanceFactory.java @@ -52,10 +52,10 @@ public class OneInstanceFactory implements XSingleComponentFactory, XServiceInfo { - private Class aMyClass; - private String aSvcImplName; - private String[] aSupportedSvcNames; - private XInterface xInstantiatedService; + private final Class aMyClass; + private final String aSvcImplName; + private final String[] aSupportedSvcNames; + private XInterface xInstantiatedService; public OneInstanceFactory( Class aMyClass, diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java index 45b2d04d04f7..bc29513e73fe 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/PropChgHelper.java @@ -47,10 +47,10 @@ public class PropChgHelper implements XPropertyChangeListener, XLinguServiceEventBroadcaster { - private XInterface xEvtSource; - private String[] aPropNames; + private final XInterface xEvtSource; + private final String[] aPropNames; private XPropertySet xPropSet; - private ArrayList<XLinguServiceEventListener> aLngSvcEvtListeners; + private final ArrayList<XLinguServiceEventListener> aLngSvcEvtListeners; public PropChgHelper( XInterface xEvtSource, diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java index f0200973dfdc..44c8b6239465 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XHyphenatedWord_impl.java @@ -39,10 +39,10 @@ public class XHyphenatedWord_impl implements { private String aWord; private String aHyphenatedWord; - private short nHyphenPos; - private short nHyphenationPos; + private final short nHyphenPos; + private final short nHyphenationPos; private Locale aLang; - private boolean bIsAltSpelling; + private final boolean bIsAltSpelling; public XHyphenatedWord_impl( String aWord, diff --git a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java index aeb0275c978c..318aba8f6abb 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Linguistic/XSpellAlternatives_impl.java @@ -41,7 +41,7 @@ public class XSpellAlternatives_impl implements private String aWord; private Locale aLanguage; private String[] aAlt; // list of alternatives, may be empty. - private short nType; // type of failure + private final short nType; // type of failure public XSpellAlternatives_impl( String aWord, diff --git a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java index 4a406a0305a5..5cc323ebb289 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java +++ b/odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java @@ -207,7 +207,7 @@ public class Number_Formats // __________ private members and methods __________ - private XSpreadsheetDocument maSpreadsheetDoc; + private final XSpreadsheetDocument maSpreadsheetDoc; private XSpreadsheet maSheet; // the first sheet diff --git a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java index f6ec7bf5a280..94936d6a248a 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java +++ b/odk/examples/DevelopersGuide/OfficeDev/OfficeConnect.java @@ -131,8 +131,8 @@ public class OfficeConnect private static OfficeConnect maConnection; // reference to remote office context - private com.sun.star.uno.XComponentContext mxOfficeContext; + private final com.sun.star.uno.XComponentContext mxOfficeContext; // reference to remote service manager - private com.sun.star.lang.XMultiComponentFactory mxServiceManager; + private final com.sun.star.lang.XMultiComponentFactory mxServiceManager; } diff --git a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java index 35b15635fbf6..6b1dead7d8fe 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java +++ b/odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java @@ -53,11 +53,11 @@ import com.sun.star.bridge.XBridge; public class ConnectionAwareClient extends java.awt.Frame implements ActionListener , com.sun.star.lang.XEventListener { - private Button _btnWriter; - private Label _txtLabel; - private String _url; + private final Button _btnWriter; + private final Label _txtLabel; + private final String _url; - private XComponentContext _ctx; + private final XComponentContext _ctx; private com.sun.star.frame.XComponentLoader _officeComponentLoader; diff --git a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java index b117d7f35c86..2fb6f3c68f24 100644 --- a/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java +++ b/odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java @@ -196,7 +196,7 @@ public class ScriptSelector { class ScriptSelectorPanel extends JPanel { - private XBrowseNode myrootnode = null; + private final XBrowseNode myrootnode; public JTextField textField; public JTree tree; @@ -308,9 +308,9 @@ class ScriptSelectorPanel extends JPanel { class ScriptTreeRenderer extends DefaultTreeCellRenderer { - private ImageIcon sofficeIcon; - private ImageIcon scriptIcon; - private ImageIcon containerIcon; + private final ImageIcon sofficeIcon; + private final ImageIcon scriptIcon; + private final ImageIcon containerIcon; public ScriptTreeRenderer() { sofficeIcon = new ImageIcon(getClass().getResource("soffice.gif")); diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java index c30115770325..a3a2e0975204 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java @@ -36,9 +36,9 @@ import com.sun.star.sheet.XResultListener; class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult { - private String aName; + private final String aName; private int nValue; - private java.util.ArrayList<XResultListener> aListeners = new java.util.ArrayList<XResultListener>(); + private final java.util.ArrayList<XResultListener> aListeners = new java.util.ArrayList<XResultListener>(); public ExampleAddInResult( String aNewName ) { @@ -79,7 +79,7 @@ class ExampleAddInResult implements com.sun.star.sheet.XVolatileResult class ExampleAddInThread extends Thread { - private java.util.HashMap<String, ExampleAddInResult> aCounters; + private final java.util.HashMap<String, ExampleAddInResult> aCounters; public ExampleAddInThread( java.util.HashMap<String, ExampleAddInResult> aResults ) { diff --git a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java index 593e8e572f48..445b75da053e 100644 --- a/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java +++ b/odk/examples/DevelopersGuide/Spreadsheet/ExampleDataPilotSource.java @@ -60,7 +60,7 @@ class ExampleSettings class ExamplePropertySetInfo implements com.sun.star.beans.XPropertySetInfo { - private com.sun.star.beans.Property[] aProperties; + private final com.sun.star.beans.Property[] aProperties; public ExamplePropertySetInfo( com.sun.star.beans.Property[] aProps ) { @@ -95,7 +95,7 @@ class ExamplePropertySetInfo implements com.sun.star.beans.XPropertySetInfo class ExampleMember implements com.sun.star.container.XNamed, com.sun.star.beans.XPropertySet { - private int nMember; + private final int nMember; public ExampleMember( int nMbr ) { @@ -171,7 +171,7 @@ class ExampleMember implements com.sun.star.container.XNamed, class ExampleMembers implements com.sun.star.container.XNameAccess { - private ExampleSettings aSettings; + private final ExampleSettings aSettings; private ExampleMember[] aMembers; public ExampleMembers( ExampleSettings aSet ) @@ -233,8 +233,8 @@ class ExampleLevel implements com.sun.star.sheet.XDataPilotMemberResults, com.sun.star.beans.XPropertySet { - private ExampleSettings aSettings; - private int nDimension; + private final ExampleSettings aSettings; + private final int nDimension; private ExampleMembers aMembers; public ExampleLevel( ExampleSettings aSet, int nDim ) @@ -379,8 +379,8 @@ class ExampleLevel implements class ExampleLevels implements com.sun.star.container.XNameAccess { - private ExampleSettings aSettings; - private int nDimension; + private final ExampleSettings aSettings; + private final int nDimension; private ExampleLevel aLevel; public ExampleLevels( ExampleSettings aSet, int nDim ) @@ -432,8 +432,8 @@ class ExampleLevels implements com.sun.star.container.XNameAccess class ExampleHierarchy implements com.sun.star.container.XNamed, com.sun.star.sheet.XLevelsSupplier { - private ExampleSettings aSettings; - private int nDimension; + private final ExampleSettings aSettings; + private final int nDimension; private ExampleLevels aLevels; public ExampleHierarchy( ExampleSettings aSet, int nDim ) @@ -468,8 +468,8 @@ class ExampleHierarchy implements com.sun.star.container.XNamed, class ExampleHierarchies implements com.sun.star.container.XNameAccess { - private ExampleSettings aSettings; - private int nDimension; + private final ExampleSettings aSettings; + private final int nDimension; private ExampleHierarchy aHierarchy; public ExampleHierarchies( ExampleSettings aSet, int nDim ) @@ -524,8 +524,8 @@ class ExampleDimension implements com.sun.star.util.XCloneable, com.sun.star.beans.XPropertySet { - private ExampleSettings aSettings; - private int nDimension; + private final ExampleSettings aSettings; + private final int nDimension; private ExampleHierarchies aHierarchies; private com.sun.star.sheet.DataPilotFieldOrientation eOrientation; @@ -694,7 +694,7 @@ class ExampleDimension implements class ExampleDimensions implements com.sun.star.container.XNameAccess { - private ExampleSettings aSettings; + private final ExampleSettings aSettings; private ExampleDimension[] aDimensions; public ExampleDimensions( ExampleSettings aSet ) @@ -763,7 +763,7 @@ public class ExampleDataPilotSource static private final String aServiceName = "com.sun.star.sheet.DataPilotSource"; static private final String aImplName = _ExampleDataPilotSource.class.getName(); - private ExampleSettings aSettings = new ExampleSettings(); + private final ExampleSettings aSettings = new ExampleSettings(); private ExampleDimensions aDimensions; public _ExampleDataPilotSource( com.sun.star.lang.XMultiServiceFactory xFactory ) diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index d1d09442e6ab..e70e5a640f34 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -110,7 +110,7 @@ public class TextDocuments { // adjust these constant to your local printer! private static String sOutputDir; - private String aPrinterName = "\\\\so-print\\xml3sof"; + private final String aPrinterName = "\\\\so-print\\xml3sof"; private XComponentContext mxRemoteContext = null; private XMultiComponentFactory mxRemoteServiceManager = null; diff --git a/odk/examples/java/ConverterServlet/ConverterServlet.java b/odk/examples/java/ConverterServlet/ConverterServlet.java index 0870f7d75e28..6a22837a7f0b 100644 --- a/odk/examples/java/ConverterServlet/ConverterServlet.java +++ b/odk/examples/java/ConverterServlet/ConverterServlet.java @@ -68,16 +68,15 @@ import com.sun.star.lang.XMultiComponentFactory; public class ConverterServlet extends HttpServlet { /** Specifies the temporary directory on the web server. */ - private String stringWorkingDirectory = - System.getProperty( "java.io.tmpdir" ).replace( '\\', '/' ); + private String stringWorkingDirectory = System.getProperty( "java.io.tmpdir" ).replace( '\\', '/' ); /** Specifies the host for the office server. */ - private String stringHost = "localhost"; + private final String stringHost = "localhost"; /** Specifies the port for the office server. */ - private String stringPort = "2083"; + private final String stringPort = "2083"; /** Called by the server (via the service method) to allow a servlet to handle * a POST request. The file from the client will be uploaded to the web server diff --git a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java b/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java index f923b15ab9fc..003fd572077e 100644 --- a/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java +++ b/odk/examples/java/EmbedDocument/EmbeddedObject/EditorFrame.java @@ -26,11 +26,11 @@ import javax.imageio.ImageIO; public class EditorFrame extends JFrame { - private OwnEmbeddedObject m_aEmbObj; - private JTextArea m_aTextArea; + private final OwnEmbeddedObject m_aEmbObj; + private final JTextArea m_aTextArea; private BufferedImage m_aBufImage; - private WindowListener m_aCloser = new WindowAdapter() + private final WindowListener m_aCloser = new WindowAdapter() { @Override public void windowClosing( WindowEvent e ) diff --git a/odk/examples/java/Spreadsheet/ChartTypeChange.java b/odk/examples/java/Spreadsheet/ChartTypeChange.java index 271433890617..44673e2b6a50 100644 --- a/odk/examples/java/Spreadsheet/ChartTypeChange.java +++ b/odk/examples/java/Spreadsheet/ChartTypeChange.java @@ -79,11 +79,11 @@ public class ChartTypeChange { /** Service factory */ - private XMultiComponentFactory xMCF = null; + private final XMultiComponentFactory xMCF; /** Component context */ - private XComponentContext xCompContext = null; + private final XComponentContext xCompContext; /** Beginning of the program. * @param args No arguments will be passed to the class. diff --git a/odk/source/com/sun/star/lib/loader/WinRegKey.java b/odk/source/com/sun/star/lib/loader/WinRegKey.java index 9c51fbf95f26..fad5d34a8a76 100644 --- a/odk/source/com/sun/star/lib/loader/WinRegKey.java +++ b/odk/source/com/sun/star/lib/loader/WinRegKey.java @@ -31,8 +31,8 @@ import java.io.InputStream; */ final class WinRegKey { - private String m_rootKeyName; - private String m_subKeyName; + private final String m_rootKeyName; + private final String m_subKeyName; // native methods to access the windows registry private static native boolean winreg_RegOpenClassesRoot( long[] hkresult ); diff --git a/qadevOOo/runner/base/java_cmp.java b/qadevOOo/runner/base/java_cmp.java index bb94269f985d..86927bc598d6 100644 --- a/qadevOOo/runner/base/java_cmp.java +++ b/qadevOOo/runner/base/java_cmp.java @@ -28,7 +28,7 @@ package base; */ public class java_cmp implements TestBase { - private TestBase mWrappedTestBase = new java_fat(); + private final TestBase mWrappedTestBase = new java_fat(); public boolean executeTest(lib.TestParameters param) { param.put("OfficeProvider", "helper.UnoProvider"); diff --git a/qadevOOo/runner/complexlib/MethodThread.java b/qadevOOo/runner/complexlib/MethodThread.java index 11bdcb61ded1..d30df06609f8 100644 --- a/qadevOOo/runner/complexlib/MethodThread.java +++ b/qadevOOo/runner/complexlib/MethodThread.java @@ -29,11 +29,11 @@ public class MethodThread extends Thread { /** The method that should be executed **/ - private Method mTestMethod = null; + private final Method mTestMethod; /** The object that implements the method **/ - private Object mInvokeClass = null; + private final Object mInvokeClass; /** A PrintWriter for debug Output **/ - private PrintWriter mLog = null; + private final PrintWriter mLog; /** An Error String **/ private String mErrMessage = null; /** Did an Exception happen? **/ diff --git a/qadevOOo/runner/convwatch/BorderRemover.java b/qadevOOo/runner/convwatch/BorderRemover.java index af7ee46a99bc..dbd933b3ad35 100644 --- a/qadevOOo/runner/convwatch/BorderRemover.java +++ b/qadevOOo/runner/convwatch/BorderRemover.java @@ -26,10 +26,10 @@ import java.lang.reflect.Method; class Rect { - private int x; - private int y; - private int w; - private int h; + private final int x; + private final int y; + private final int w; + private final int h; public Rect(int _x, int _y, int _w, int _h) { diff --git a/qadevOOo/runner/convwatch/DBHelper.java b/qadevOOo/runner/convwatch/DBHelper.java index 03128eafa0ba..dc76af3ad9d2 100644 --- a/qadevOOo/runner/convwatch/DBHelper.java +++ b/qadevOOo/runner/convwatch/DBHelper.java @@ -49,8 +49,8 @@ class ShareConnection class MySQLThread extends Thread { - private Connection m_aCon = null; - private String m_sSQL; + private final Connection m_aCon; + private final String m_sSQL; public MySQLThread(Connection _aCon, String _sSQL) { m_aCon = _aCon; diff --git a/qadevOOo/runner/convwatch/DirectoryHelper.java b/qadevOOo/runner/convwatch/DirectoryHelper.java index 26cd831a7042..9d322c52fb5e 100644 --- a/qadevOOo/runner/convwatch/DirectoryHelper.java +++ b/qadevOOo/runner/convwatch/DirectoryHelper.java @@ -27,7 +27,7 @@ import java.util.ArrayList; */ public class DirectoryHelper { - private ArrayList<String> m_aFileList = new ArrayList<String>(); + private final ArrayList<String> m_aFileList = new ArrayList<String>(); private boolean m_bRecursiveIsAllowed = true; private void setRecursiveIsAllowed(boolean _bValue) diff --git a/qadevOOo/runner/convwatch/GraphicalTestArguments.java b/qadevOOo/runner/convwatch/GraphicalTestArguments.java index e4dd7c0b6028..d5cc3c4f5800 100644 --- a/qadevOOo/runner/convwatch/GraphicalTestArguments.java +++ b/qadevOOo/runner/convwatch/GraphicalTestArguments.java @@ -81,15 +81,15 @@ public class GraphicalTestArguments private boolean m_bIncludeSubdirectories; - private TestParameters m_aCurrentParams; + private final TestParameters m_aCurrentParams; - private int m_nMaxPages = 0; // default is 0 (print all pages) - private String m_sOnlyPage = ""; // default is "", there is no page which we want to print only. + private final int m_nMaxPages; // default is 0 (print all pages) + private final String m_sOnlyPage; // default is "", there is no page which we want to print only. private int m_nResolutionInDPI = 0; private boolean m_bStoreFile = true; - private boolean m_bResuseOffice = false; + private final boolean m_bResuseOffice; diff --git a/qadevOOo/runner/convwatch/ImageHelper.java b/qadevOOo/runner/convwatch/ImageHelper.java index 2644223e2ebb..5723c3fc85fb 100644 --- a/qadevOOo/runner/convwatch/ImageHelper.java +++ b/qadevOOo/runner/convwatch/ImageHelper.java @@ -26,9 +26,9 @@ import java.lang.reflect.Method; class ImageHelper { - private Image m_aImage; - private int[] m_aPixels; - private int m_w = 0; + private final Image m_aImage; + private final int[] m_aPixels; + private final int m_w; private ImageHelper(Image _aImage) diff --git a/qadevOOo/runner/convwatch/IniFile.java b/qadevOOo/runner/convwatch/IniFile.java index 8e1747bf1308..08e9629883ad 100644 --- a/qadevOOo/runner/convwatch/IniFile.java +++ b/qadevOOo/runner/convwatch/IniFile.java @@ -32,9 +32,9 @@ class IniFile * internal representation of the ini file content. * Problem, if ini file changed why other write something difference, we don't realise this. */ - private String m_sFilename; - private ArrayList<String> m_aList; - private boolean m_bListContainUnsavedChanges = false; + private final String m_sFilename; + private final ArrayList<String> m_aList; + private final boolean m_bListContainUnsavedChanges = false; /** open a ini file by its name diff --git a/qadevOOo/runner/convwatch/PRNCompare.java b/qadevOOo/runner/convwatch/PRNCompare.java index bc542752cc2b..1dac4c8eed97 100644 --- a/qadevOOo/runner/convwatch/PRNCompare.java +++ b/qadevOOo/runner/convwatch/PRNCompare.java @@ -30,7 +30,7 @@ import java.util.ArrayList; public class PRNCompare { - private String fs; + private final String fs; public PRNCompare() { diff --git a/qadevOOo/runner/convwatch/TriState.java b/qadevOOo/runner/convwatch/TriState.java index c72e06c2b913..ec9dfd194336 100644 --- a/qadevOOo/runner/convwatch/TriState.java +++ b/qadevOOo/runner/convwatch/TriState.java @@ -24,7 +24,7 @@ public class TriState public static final TriState FALSE = new TriState(0); public static final TriState UNSET = new TriState(-1); - private int m_nValue; + private final int m_nValue; /** Allocates a <code>TriState</code> object representing the diff --git a/qadevOOo/runner/graphical/DirectoryHelper.java b/qadevOOo/runner/graphical/DirectoryHelper.java index 6ba7e6cdfdd6..0d0462795433 100644 --- a/qadevOOo/runner/graphical/DirectoryHelper.java +++ b/qadevOOo/runner/graphical/DirectoryHelper.java @@ -27,7 +27,7 @@ import java.util.ArrayList; */ public class DirectoryHelper { - private ArrayList<String> m_aFileList = new ArrayList<String>(); + private final ArrayList<String> m_aFileList = new ArrayList<String>(); private boolean m_bRecursiveIsAllowed = true; private void setRecursiveIsAllowed(boolean _bValue) diff --git a/qadevOOo/runner/graphical/ImageHelper.java b/qadevOOo/runner/graphical/ImageHelper.java index 8f4249697192..f625b3d95cff 100644 --- a/qadevOOo/runner/graphical/ImageHelper.java +++ b/qadevOOo/runner/graphical/ImageHelper.java @@ -26,9 +26,9 @@ import java.lang.reflect.Method; class ImageHelper { - private Image m_aImage; - private int[] m_aPixels; - private int m_w = 0; + private final Image m_aImage; + private final int[] m_aPixels; + private final int m_w; private ImageHelper(Image _aImage) diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java index fe2df6e62878..cc82ce4c86db 100644 --- a/qadevOOo/runner/graphical/IniFile.java +++ b/qadevOOo/runner/graphical/IniFile.java @@ -35,8 +35,8 @@ public class IniFile implements Enumeration<String> * internal representation of the ini file content. * Problem, if ini file changed why other write something difference, we don't realise this. */ - private String m_sFilename; - private ArrayList<String> m_aList; + private final String m_sFilename; + private final ArrayList<String> m_aList; private boolean m_bListContainUnsavedChanges = false; private int m_aEnumerationPos = 0; diff --git a/qadevOOo/runner/graphical/JPEGComparator.java b/qadevOOo/runner/graphical/JPEGComparator.java index f793b527e607..4d07a03d3428 100644 --- a/qadevOOo/runner/graphical/JPEGComparator.java +++ b/qadevOOo/runner/graphical/JPEGComparator.java @@ -88,7 +88,7 @@ class NameDPIPage class CountNotXXXPixelsFromImage extends Thread { - private String m_sFilename; + private final String m_sFilename; protected int m_nValue; CountNotXXXPixelsFromImage(String _sFilename) diff --git a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java index a5c1667e7eb1..ba9a7ba25c64 100644 --- a/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java +++ b/qadevOOo/runner/graphical/MSOfficePostscriptCreator.java @@ -32,12 +32,6 @@ import helper.OSHelper; * *.xls as excel * *.ppt as powerpoint */ - -//class ProcessHelper -//{ -// ArrayList m_aArray; -//} - public class MSOfficePostscriptCreator implements IOffice { private String m_sPrinterName; // within Windows the tools need a printer name; @@ -47,11 +41,10 @@ public class MSOfficePostscriptCreator implements IOffice m_sPrinterName = _s; } - private ParameterHelper m_aParameterHelper; + private final ParameterHelper m_aParameterHelper; private String m_sDocumentName; - private String m_sResult; + private final String m_sResult; - // CTor public MSOfficePostscriptCreator(ParameterHelper _aParam, String _sResult) { m_aParameterHelper = _aParam; diff --git a/qadevOOo/runner/graphical/Office.java b/qadevOOo/runner/graphical/Office.java index 0cba0f63fd70..85785b2f3dad 100644 --- a/qadevOOo/runner/graphical/Office.java +++ b/qadevOOo/runner/graphical/Office.java @@ -22,9 +22,9 @@ import java.util.ArrayList; public class Office implements IOffice { - private ParameterHelper m_aParameterHelper; + private final ParameterHelper m_aParameterHelper; private String m_sDocumentName; - private String m_sResult; + private final String m_sResult; private IOffice m_aOffice = null; public Office(ParameterHelper _aParam, String _sResult) diff --git a/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java b/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java index 96a6d0a69f77..199b169c88af 100644 --- a/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java +++ b/qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java @@ -81,7 +81,7 @@ class PropertySetHelper public class OpenOfficeDatabaseReportExtractor extends Assurance { - private ParameterHelper m_aParameterHelper; + private final ParameterHelper m_aParameterHelper; public OpenOfficeDatabaseReportExtractor(ParameterHelper _aParameter) { diff --git a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java index cd0dde453ade..dfbdfd8a648c 100644 --- a/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java +++ b/qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java @@ -50,8 +50,8 @@ import java.io.File; */ public class OpenOfficePostscriptCreator implements IOffice { - private ParameterHelper m_aParameterHelper; - private String m_sOutputURL; + private final ParameterHelper m_aParameterHelper; + private final String m_sOutputURL; private String m_sBasename; private String m_sDocumentName; private XComponent m_aDocument; diff --git a/qadevOOo/runner/graphical/ParameterHelper.java b/qadevOOo/runner/graphical/ParameterHelper.java index 0f3c06d8aa83..2c9e95217ed9 100644 --- a/qadevOOo/runner/graphical/ParameterHelper.java +++ b/qadevOOo/runner/graphical/ParameterHelper.java @@ -67,12 +67,12 @@ public class ParameterHelper private String m_sPrinterName = null; - private int m_nResolutionInDPI = 180; + private final int m_nResolutionInDPI = 180; private String m_sInputPath = null; private String m_sOutputPath = null; - private TestParameters m_aCurrentParams; + private final TestParameters m_aCurrentParams; public ParameterHelper(TestParameters param) { diff --git a/qadevOOo/runner/graphical/Tolerance.java b/qadevOOo/runner/graphical/Tolerance.java index 80857168de7d..647dfb750760 100644 --- a/qadevOOo/runner/graphical/Tolerance.java +++ b/qadevOOo/runner/graphical/Tolerance.java @@ -20,7 +20,7 @@ package graphical; public class Tolerance { - private int m_nTolerance; + private final int m_nTolerance; public Tolerance(int _nAccept) { m_nTolerance = _nAccept; diff --git a/qadevOOo/runner/helper/BuildEnvTools.java b/qadevOOo/runner/helper/BuildEnvTools.java index 3cd50a823397..826832276683 100644 --- a/qadevOOo/runner/helper/BuildEnvTools.java +++ b/qadevOOo/runner/helper/BuildEnvTools.java @@ -35,7 +35,7 @@ public class BuildEnvTools { private final boolean mDebug; private final String mPlatform; private final String mShell; - private boolean mCygwin; + private final boolean mCygwin; /** * This constructor creates an instance of BuildEncTools. It is verifying for all neccesarry diff --git a/qadevOOo/runner/helper/ConfigHelper.java b/qadevOOo/runner/helper/ConfigHelper.java index d0fd6c9839c5..2adadaf2e146 100644 --- a/qadevOOo/runner/helper/ConfigHelper.java +++ b/qadevOOo/runner/helper/ConfigHelper.java @@ -85,7 +85,7 @@ import com.sun.star.util.*; */ public class ConfigHelper { - private XHierarchicalNameAccess m_xConfig = null; + private final XHierarchicalNameAccess m_xConfig; public ConfigHelper(XMultiServiceFactory xSMGR , diff --git a/qadevOOo/runner/helper/LoggingThread.java b/qadevOOo/runner/helper/LoggingThread.java index 9869e7885b9d..590a467a7134 100644 --- a/qadevOOo/runner/helper/LoggingThread.java +++ b/qadevOOo/runner/helper/LoggingThread.java @@ -36,10 +36,10 @@ import util.utils; */ public class LoggingThread extends Thread { - private TestParameters param; - private LogWriter log = null; + private final TestParameters param; + private final LogWriter log; private boolean finished = false; - private boolean debug = false; + private final boolean debug; public LoggingThread(LogWriter log, TestParameters tParam) { this.log = log; diff --git a/qadevOOo/runner/helper/OfficeWatcher.java b/qadevOOo/runner/helper/OfficeWatcher.java index 624e5c0238d1..60900c0052bd 100644 --- a/qadevOOo/runner/helper/OfficeWatcher.java +++ b/qadevOOo/runner/helper/OfficeWatcher.java @@ -24,14 +24,14 @@ import util.utils; public class OfficeWatcher extends Thread implements share.Watcher { public boolean finish; - private TestParameters params; + private final TestParameters params; private int StoredPing = 0; - private boolean debug = false; + private final boolean debug; public OfficeWatcher(TestParameters param) { - finish = false; + this.finish = false; this.params = param; - debug = params.getBool(util.PropertyName.DEBUG_IS_ACTIVE); + this.debug = params.getBool(util.PropertyName.DEBUG_IS_ACTIVE); } /** diff --git a/qadevOOo/runner/helper/ProcessHandler.java b/qadevOOo/runner/helper/ProcessHandler.java index fb3ff77e8f28..332eb52f5a83 100644 --- a/qadevOOo/runner/helper/ProcessHandler.java +++ b/qadevOOo/runner/helper/ProcessHandler.java @@ -43,11 +43,11 @@ import util.utils; class Pump extends Thread { - private LineNumberReader reader; - private String pref; - private StringBuffer buf = new StringBuffer(256); - private PrintWriter log; - private boolean bOutput; + private final LineNumberReader reader; + private final String pref; + private final StringBuffer buf = new StringBuffer(256); + private final PrintWriter log; + private final boolean bOutput; /** * Creates Pump for specified <code>InputStream</code>. @@ -782,8 +782,8 @@ public class ProcessHandler { private int m_nTimeoutInSec; - private String m_sProcessToStart; - private boolean m_bInterrupt; + private final String m_sProcessToStart; + private final boolean m_bInterrupt; private ProcessWatcher(int _nTimeOut, String _sProcess) { diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java index 0493b4bbf37e..c1f0b308f07b 100644 --- a/qadevOOo/runner/lib/MultiMethodTest.java +++ b/qadevOOo/runner/lib/MultiMethodTest.java @@ -95,7 +95,7 @@ public class MultiMethodTest /** * Contains names of the methods have been already called */ - private ArrayList<String> methCalled = new ArrayList<String>(10); + private final ArrayList<String> methCalled = new ArrayList<String>(10); /** * Disposes the test environment, which was corrupted by the test. diff --git a/qadevOOo/runner/lib/StatusException.java b/qadevOOo/runner/lib/StatusException.java index a4bf07f4703f..328fc4ff1899 100644 --- a/qadevOOo/runner/lib/StatusException.java +++ b/qadevOOo/runner/lib/StatusException.java @@ -27,7 +27,7 @@ public class StatusException extends RuntimeException { /** * The Status contained in the StatusException. */ - private Status status; + private final Status status; /** * Constructs a StatusException containing an exception Status. diff --git a/qadevOOo/runner/lib/TestParameters.java b/qadevOOo/runner/lib/TestParameters.java index 69bf9fcd2980..abd1dc29097b 100644 --- a/qadevOOo/runner/lib/TestParameters.java +++ b/qadevOOo/runner/lib/TestParameters.java @@ -51,7 +51,7 @@ public class TestParameters extends HashMap<String,Object> { * Debug information will always be written on standard out.<br> * default is true */ - private boolean DebugIsActive = false; + private final boolean DebugIsActive = false; /** * Wrapper around "get()" with some debug output diff --git a/qadevOOo/runner/stats/DataBaseOutProducer.java b/qadevOOo/runner/stats/DataBaseOutProducer.java index 6ffe9b705c39..f362d7e7e498 100644 --- a/qadevOOo/runner/stats/DataBaseOutProducer.java +++ b/qadevOOo/runner/stats/DataBaseOutProducer.java @@ -24,7 +24,7 @@ import java.util.HashMap; public abstract class DataBaseOutProducer implements LogWriter { protected HashMap<String,Object> mSqlInput = null; - private HashMap<String, String[]> mSqlOutput = null; + private final HashMap<String, String[]> mSqlOutput = null; private String[] mWriteableEntryTypes = null; private SQLExecution mSqlExec; protected boolean m_bDebug = false; diff --git a/qadevOOo/runner/stats/SQLExecution.java b/qadevOOo/runner/stats/SQLExecution.java index 34f8949b7772..487716c0e8c6 100644 --- a/qadevOOo/runner/stats/SQLExecution.java +++ b/qadevOOo/runner/stats/SQLExecution.java @@ -35,10 +35,10 @@ public class SQLExecution { private Connection mConnection = null; private Statement mStatement = null; - private String mJdbcClass = null; - private String mDbURL = null; - private String mUser = null; - private String mPassword = null; + private final String mJdbcClass; + private final String mDbURL; + private final String mUser; + private final String mPassword; private boolean m_bConnectionOpen = false; private boolean m_bDebug = false; diff --git a/qadevOOo/runner/util/ControlDsc.java b/qadevOOo/runner/util/ControlDsc.java index e5eb0d2ea62b..736fe01b0351 100644 --- a/qadevOOo/runner/util/ControlDsc.java +++ b/qadevOOo/runner/util/ControlDsc.java @@ -28,7 +28,7 @@ import com.sun.star.uno.UnoRuntime; public class ControlDsc extends InstDescr { - private String name = null; + private String name; static final String ifcName = "com.sun.star.form.XFormComponent"; String service = "com.sun.star.form.component.CommandButton"; diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java index f6e7c815bc81..15aa1d926514 100644 --- a/qadevOOo/runner/util/DBTools.java +++ b/qadevOOo/runner/util/DBTools.java @@ -41,8 +41,8 @@ import java.sql.DriverManager; */ public class DBTools { - private XMultiServiceFactory xMSF = null ; - private XNamingService dbContext = null ; + private final XMultiServiceFactory xMSF; + private XNamingService dbContext; //JDBC driver public final static String TST_JDBC_DRIVER = "org.gjt.mm.mysql.Driver"; @@ -122,7 +122,7 @@ public class DBTools { /** * Representation of <code>'SuppressVersionColumns'</code> property. */ - private Boolean SuppressVersionColumns = null ; + private Boolean SuppressVersionColumns; /** * Representation of <code>'IsReadOnly'</code> property. */ diff --git a/qadevOOo/runner/util/DefaultDsc.java b/qadevOOo/runner/util/DefaultDsc.java index 8090fad5c2a2..9c270007c76d 100644 --- a/qadevOOo/runner/util/DefaultDsc.java +++ b/qadevOOo/runner/util/DefaultDsc.java @@ -23,14 +23,13 @@ import com.sun.star.uno.XInterface; import com.sun.star.uno.UnoRuntime; /** - * Defaultdescriptor: * This descriptor is useful for instances in default values. */ public class DefaultDsc extends InstDescr { - private String name = null; - private String ifcName = null; - private String service = null; + private final String name = null; + private final String ifcName; + private final String service; public DefaultDsc( String Interface, String kind ) { service = kind; diff --git a/qadevOOo/runner/util/InstCreator.java b/qadevOOo/runner/util/InstCreator.java index e1eb8c86ffcf..de40b07c03b1 100644 --- a/qadevOOo/runner/util/InstCreator.java +++ b/qadevOOo/runner/util/InstCreator.java @@ -31,11 +31,11 @@ import com.sun.star.container.XIndexAccess; public class InstCreator implements XInstCreator { - private XInterface xParent; - private XMultiServiceFactory xMSF; - private XInterface xInstance; - private XIndexAccess xIA; - private InstDescr iDsc; + private final XInterface xParent; + private final XMultiServiceFactory xMSF; + private final XInterface xInstance; + private final XIndexAccess xIA; + private final InstDescr iDsc; public InstCreator( XInterface xParent, InstDescr iDsc ) { this.xParent = xParent; diff --git a/qadevOOo/runner/util/SOfficeFactory.java b/qadevOOo/runner/util/SOfficeFactory.java index c45fbd6131e0..0150e3c035cb 100644 --- a/qadevOOo/runner/util/SOfficeFactory.java +++ b/qadevOOo/runner/util/SOfficeFactory.java @@ -42,7 +42,7 @@ import com.sun.star.drawing.*; public class SOfficeFactory { private static HashMap<String, SOfficeFactory> lookup = new HashMap<String, SOfficeFactory>(10); - private XComponentLoader oCLoader; + private final XComponentLoader oCLoader; private SOfficeFactory(XMultiServiceFactory xMSF) { // get XInterface of Desktop service diff --git a/qadevOOo/runner/util/ShapeDsc.java b/qadevOOo/runner/util/ShapeDsc.java index 9610c3dabdb5..99fdaea84fc8 100644 --- a/qadevOOo/runner/util/ShapeDsc.java +++ b/qadevOOo/runner/util/ShapeDsc.java @@ -28,22 +28,23 @@ import com.sun.star.awt.*; */ public class ShapeDsc extends InstDescr { - private int x = 0; - private int y = 0; - private int height = 0; - private int width = 0; - private String name = null; + private final int x; + private final int y; + private final int height; + private final int width; + private final String name = null; private static final String ifcName = "com.sun.star.drawing.XShape"; - private String service = "com.sun.star.drawing.RectangleShape"; + private final String service; - public ShapeDsc( int nheight, int nwidth, int nx, int ny, String kind ) { - x=nx; - y=ny; - height=nheight; - width=nwidth; - service="com.sun.star.drawing."+kind+"Shape"; + public ShapeDsc(int nheight, int nwidth, int nx, int ny, String kind) { + x = nx; + y = ny; + height = nheight; + width = nwidth; + service = "com.sun.star.drawing." + kind + "Shape"; initShape(); } + @Override public String getName() { return name; diff --git a/qadevOOo/runner/util/StyleFamilyDsc.java b/qadevOOo/runner/util/StyleFamilyDsc.java index c3cf2baae49b..daef8b563401 100644 --- a/qadevOOo/runner/util/StyleFamilyDsc.java +++ b/qadevOOo/runner/util/StyleFamilyDsc.java @@ -27,7 +27,7 @@ import com.sun.star.uno.UnoRuntime; */ public class StyleFamilyDsc extends InstDescr { - private String name = null; + private String name; static final String ifcName = "com.sun.star.style.XStyle"; String service = "com.sun.star.style.CharacterStyle"; diff --git a/qadevOOo/runner/util/XLayerHandlerImpl.java b/qadevOOo/runner/util/XLayerHandlerImpl.java index 2f7dcaf50857..399db9a24358 100644 --- a/qadevOOo/runner/util/XLayerHandlerImpl.java +++ b/qadevOOo/runner/util/XLayerHandlerImpl.java @@ -20,7 +20,7 @@ package util; public class XLayerHandlerImpl implements com.sun.star.configuration.backend.XLayerHandler { private String calls = ""; - private String ls = System.getProperty("line.separator"); + private final String ls = System.getProperty("line.separator"); public void addOrReplaceNode(String str, short param) throws com.sun.star.configuration.backend.MalformedDataException, diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java index 64330a10bbf6..bc989da981e6 100644 --- a/qadevOOo/runner/util/XMLTools.java +++ b/qadevOOo/runner/util/XMLTools.java @@ -42,8 +42,8 @@ public class XMLTools { public String Type ; public String Value ; } - private HashMap<String, Attribute> attrByName = new HashMap<String, Attribute>() ; - private ArrayList<Attribute> attributes = new ArrayList<Attribute>() ; + private final HashMap<String, Attribute> attrByName = new HashMap<String, Attribute>() ; + private final ArrayList<Attribute> attributes = new ArrayList<Attribute>() ; private PrintWriter log = null ; /** @@ -342,8 +342,8 @@ public class XMLTools { * appropriate message is output. */ public static class XMLTagsChecker extends XMLWellFormChecker { - private HashMap<String,String> tags = new HashMap<String,String>() ; - private HashMap<String,String> chars = new HashMap<String,String>() ; + private final HashMap<String,String> tags = new HashMap<String,String>() ; + private final HashMap<String,String> chars = new HashMap<String,String>() ; private boolean allOK = true ; public XMLTagsChecker(PrintWriter log) { @@ -455,7 +455,7 @@ public class XMLTools { * name, or attribute value additionally. */ public static class Tag { - private String name = null; + private final String name; private String[][] attrList = new String[0][3] ; /** @@ -594,11 +594,11 @@ public class XMLTools { * character data exists inside any tag specified. */ public static class XMLChecker extends XMLWellFormChecker { - private HashSet<String> tagSet = new HashSet<String>() ; - private ArrayList<Tag[]> tags = new ArrayList<Tag[]>() ; - private ArrayList<Object[]> chars = new ArrayList<Object[]>() ; - private ArrayList<String> tagStack = new ArrayList<String>() ; - private ArrayList<AttributeList> attrStack = new ArrayList<AttributeList>() ; + private final HashSet<String> tagSet = new HashSet<String>() ; + private final ArrayList<Tag[]> tags = new ArrayList<Tag[]>() ; + private final ArrayList<Object[]> chars = new ArrayList<Object[]>() ; + private final ArrayList<String> tagStack = new ArrayList<String>() ; + private final ArrayList<AttributeList> attrStack = new ArrayList<AttributeList>() ; public XMLChecker(PrintWriter log, boolean writeXML) { super(log, writeXML) ; diff --git a/qadevOOo/runner/util/XSchemaHandlerImpl.java b/qadevOOo/runner/util/XSchemaHandlerImpl.java index 06758014bbc7..cd72fd6ed11d 100644 --- a/qadevOOo/runner/util/XSchemaHandlerImpl.java +++ b/qadevOOo/runner/util/XSchemaHandlerImpl.java @@ -20,7 +20,7 @@ package util; public class XSchemaHandlerImpl implements com.sun.star.configuration.backend.XSchemaHandler { private String calls = ""; - private String ls = System.getProperty("line.separator"); + private final String ls = System.getProperty("line.separator"); public void addInstance(String str, com.sun.star.configuration.backend.TemplateIdentifier templateIdentifier) diff --git a/qadevOOo/runner/util/compare/GraphicalComparator.java b/qadevOOo/runner/util/compare/GraphicalComparator.java index 82495a8a9a7d..3e91dd04d280 100644 --- a/qadevOOo/runner/util/compare/GraphicalComparator.java +++ b/qadevOOo/runner/util/compare/GraphicalComparator.java @@ -29,7 +29,7 @@ import convwatch.ConvWatchException; class GraphicalComparator implements DocComparator { - private GraphicalTestArguments m_aArguments; + private final GraphicalTestArguments m_aArguments; protected GraphicalComparator(TestParameters aParams) { diff --git a/qadevOOo/runner/util/db/DataSource.java b/qadevOOo/runner/util/db/DataSource.java index 0ee1775f5be7..5e54a625e9ac 100644 --- a/qadevOOo/runner/util/db/DataSource.java +++ b/qadevOOo/runner/util/db/DataSource.java @@ -138,8 +138,8 @@ public class DataSource } } - private XMultiServiceFactory m_orb = null; - private XDataSource m_dataSource = null; - private XPropertySet m_properties = null; + private final XMultiServiceFactory m_orb; + private final XDataSource m_dataSource; + private final XPropertySet m_properties; private DatabaseDocument m_document = null; } diff --git a/qadevOOo/runner/util/db/DataSourceDescriptor.java b/qadevOOo/runner/util/db/DataSourceDescriptor.java index 6aa9a8f6c28b..f4de986eab7c 100644 --- a/qadevOOo/runner/util/db/DataSourceDescriptor.java +++ b/qadevOOo/runner/util/db/DataSourceDescriptor.java @@ -60,5 +60,5 @@ public class DataSourceDescriptor return new DataSource( m_orb, this ); } - private XMultiServiceFactory m_orb = null; + private final XMultiServiceFactory m_orb; } diff --git a/qadevOOo/runner/util/db/DatabaseDocument.java b/qadevOOo/runner/util/db/DatabaseDocument.java index d620a8248b70..4b8228f316a1 100644 --- a/qadevOOo/runner/util/db/DatabaseDocument.java +++ b/qadevOOo/runner/util/db/DatabaseDocument.java @@ -72,8 +72,8 @@ public class DatabaseDocument m_storeDoc.storeAsURL( _url, new PropertyValue[] { } ); } - private DataSource m_dataSource; - private XOfficeDatabaseDocument m_databaseDocument; - private XModel m_model; - private XStorable m_storeDoc; + private final DataSource m_dataSource; + private final XOfficeDatabaseDocument m_databaseDocument; + private final XModel m_model; + private final XStorable m_storeDoc; } 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; diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java index 45bfb1b6b7a3..befae9f9ee66 100644 --- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java @@ -135,7 +135,7 @@ public class SDBCReportDataFactory implements DataSourceFactory private class ParameterDefinition { private int parameterCount = 0; - private ArrayList<Integer> parameterIndex = new ArrayList<Integer>(); + private final ArrayList<Integer> parameterIndex = new ArrayList<Integer>(); } private static final Log LOGGER = LogFactory.getLog(SDBCReportDataFactory.class); public static final String COMMAND_TYPE = "command-type"; diff --git a/reportdesign/qa/complex/reportdesign/FileURL.java b/reportdesign/qa/complex/reportdesign/FileURL.java index 02c3a00a010e..fa67b191e917 100644 --- a/reportdesign/qa/complex/reportdesign/FileURL.java +++ b/reportdesign/qa/complex/reportdesign/FileURL.java @@ -24,7 +24,7 @@ import java.net.URISyntaxException; public class FileURL { - private String m_sFileURL; + private final String m_sFileURL; public FileURL(String _sFileURL) { diff --git a/ridljar/com/sun/star/uno/Enum.java b/ridljar/com/sun/star/uno/Enum.java index 53615cb87c5f..90ac08ead25a 100644 --- a/ridljar/com/sun/star/uno/Enum.java +++ b/ridljar/com/sun/star/uno/Enum.java @@ -29,7 +29,7 @@ package com.sun.star.uno; * </p> */ public abstract class Enum { - private int m_value; + private final int m_value; /** * Constructs a enum value. diff --git a/sc/qa/complex/dataPilot/CheckDataPilot.java b/sc/qa/complex/dataPilot/CheckDataPilot.java index ee4980fece72..9d8b7fdfe9c9 100644 --- a/sc/qa/complex/dataPilot/CheckDataPilot.java +++ b/sc/qa/complex/dataPilot/CheckDataPilot.java @@ -69,7 +69,7 @@ public class CheckDataPilot { * 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; /** * The test parameters diff --git a/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java index 639d8ae85ea9..ee6888613de4 100644 --- a/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java +++ b/sc/qa/complex/dataPilot/_XDataPilotDescriptor.java @@ -52,17 +52,17 @@ import lib.TestParameters; */ public class _XDataPilotDescriptor { - private XDataPilotDescriptor oObj = null; - private CellRangeAddress CRA = new CellRangeAddress((short)1, 0, 0, 5, 5); + private final XDataPilotDescriptor oObj; + private final CellRangeAddress CRA = new CellRangeAddress((short)1, 0, 0, 5, 5); - private String sTag = "XDataPilotDescriptor_Tag"; + private final String sTag = "XDataPilotDescriptor_Tag"; private String fieldsNames[]; private int tEnvFieldsAmount = 0; /** * The test parameters */ - private TestParameters param = null; + private final TestParameters param; /** * Constructor: gets the object to test, a logger and the test parameters diff --git a/sc/qa/complex/dataPilot/_XDataPilotTable.java b/sc/qa/complex/dataPilot/_XDataPilotTable.java index 1f9d13357eaa..bb68565f196e 100644 --- a/sc/qa/complex/dataPilot/_XDataPilotTable.java +++ b/sc/qa/complex/dataPilot/_XDataPilotTable.java @@ -45,7 +45,7 @@ import lib.TestParameters; */ public class _XDataPilotTable { - private XDataPilotTable oObj = null; + private final XDataPilotTable oObj; private XCell xCellForChange = null; private XCell xCellForCheck = null; private CellAddress OutputRange = null; @@ -54,7 +54,7 @@ public class _XDataPilotTable { /** * The test parameters */ - private TestParameters param = null; + private final TestParameters param; /** * Constructor: gets the object to test, a logger and the test parameters diff --git a/sc/qa/complex/dataPilot/_XNamed.java b/sc/qa/complex/dataPilot/_XNamed.java index 277971cbfe59..2161abdd0039 100644 --- a/sc/qa/complex/dataPilot/_XNamed.java +++ b/sc/qa/complex/dataPilot/_XNamed.java @@ -43,7 +43,7 @@ public class _XNamed { /** * The object that is testsed. */ - private XNamed oObj = null; + private final XNamed oObj; /** * Constructor: gets the object to test, a logger and the test parameters diff --git a/sc/qa/complex/dataPilot/_XPropertySet.java b/sc/qa/complex/dataPilot/_XPropertySet.java index 473e5910f782..7573ffcb1b6f 100644 --- a/sc/qa/complex/dataPilot/_XPropertySet.java +++ b/sc/qa/complex/dataPilot/_XPropertySet.java @@ -51,12 +51,12 @@ public class _XPropertySet { /** * The object that is testsed. */ - private XPropertySet oObj = null; + private final XPropertySet oObj; /** * The test parameters */ - private TestParameters param = null; + private final TestParameters param; /** * Flag that indicates change listener was called. @@ -67,7 +67,7 @@ public class _XPropertySet { /** * The own property change listener */ - private XPropertyChangeListener PClistener = new MyChangeListener(); + private final XPropertyChangeListener PClistener = new MyChangeListener(); /** * Listener that must be called on bound property changing. @@ -91,7 +91,7 @@ public class _XPropertySet { /** * The own vetoable change listener */ - private XVetoableChangeListener VClistener = new MyVetoListener(); + private final XVetoableChangeListener VClistener = new MyVetoListener(); /** * Listener that must be called on constrained property changing. @@ -110,7 +110,7 @@ public class _XPropertySet { /** * Properties to test */ - private PropsToTest PTT = new PropsToTest(); + private final PropsToTest PTT = new PropsToTest(); /** * Structure that collects three properties of each type to test : diff --git a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java index 92f5ee777f97..21d78d47c609 100644 --- a/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java +++ b/scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog.java @@ -145,7 +145,7 @@ public class SecurityDialog extends WeakBase implements private static final int lineWrapH = 12; private String _pushed = _doNotRunButtonName; - private XComponentContext _xComponentContext; + private final XComponentContext _xComponentContext; private XDialog _xDialog; public SecurityDialog(XComponentContext xComponentContext) { @@ -539,7 +539,7 @@ public class SecurityDialog extends WeakBase implements private class ActionListenerImpl implements com.sun.star.awt.XActionListener { - private String _buttonName; + private final String _buttonName; private ActionListenerImpl(String buttonName) { _buttonName = buttonName; diff --git a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java index a4350fb92d59..303b600e2e3b 100644 --- a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java +++ b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java @@ -41,7 +41,7 @@ import com.sun.star.uno.XComponentContext; public class DialogFactory { private static DialogFactory factory; - private XComponentContext xComponentContext; + private final XComponentContext xComponentContext; // singleton private DialogFactory(XComponentContext xComponentContext) { diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 23999a1c1e8c..85b8b3d6c057 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -51,9 +51,9 @@ import javax.swing.JOptionPane; public class ParcelBrowseNode extends PropertySet implements XBrowseNode, XInvocation { - private ScriptProvider provider; + private final ScriptProvider provider; private Collection<XBrowseNode> browsenodes; - private ParcelContainer container; + private final ParcelContainer container; private Parcel parcel; public ParcelBrowseNode(ScriptProvider provider, ParcelContainer container, diff --git a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java index 3bf1ba5eaf25..3bcf706b3dbe 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ProviderBrowseNode.java @@ -47,11 +47,11 @@ import javax.swing.JOptionPane; public class ProviderBrowseNode extends PropertySet implements XBrowseNode, XInvocation { - private ScriptProvider provider; + private final ScriptProvider provider; private Collection<XBrowseNode> browsenodes; - private String name; + private final String name; protected ParcelContainer container; - private XComponentContext m_xCtx; + private final XComponentContext m_xCtx; public ProviderBrowseNode(ScriptProvider provider, ParcelContainer container, XComponentContext xCtx) { diff --git a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java index fe2efd939899..3c7bfa03f327 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ScriptBrowseNode.java @@ -53,12 +53,12 @@ import java.util.HashMap; public class ScriptBrowseNode extends PropertySet implements XBrowseNode, XInvocation { - private ScriptProvider provider; + private final ScriptProvider provider; private Parcel parent; private String name; - private boolean editable = false; + private boolean editable; private boolean deletable = false; private boolean renamable = false; diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java index b641cd038b66..85a9b8d1d551 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java @@ -64,7 +64,7 @@ public class ParcelContainer implements XNameAccess { static protected XSimpleFileAccess m_xSFA; protected XComponentContext m_xCtx; private ParcelContainer parent = null; - private Collection<ParcelContainer> childContainers = new + private final Collection<ParcelContainer> childContainers = new ArrayList<ParcelContainer>(10); private boolean isPkgContainer = false; diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java index b7817a7deea9..b6db2397ce40 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelDescriptor.java @@ -54,7 +54,7 @@ public class ParcelDescriptor { private Document document = null; private String language = null; - private Map<String, String> languagedepprops = new HashMap<String, String>(3); + private final Map<String, String> languagedepprops = new HashMap<String, String>(3); public ParcelDescriptor() throws IOException { ByteArrayInputStream bis = null; diff --git a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java index d19928fa445e..edca57b23286 100644 --- a/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java +++ b/scripting/java/com/sun/star/script/framework/container/ScriptMetaData.java @@ -38,9 +38,9 @@ import java.util.StringTokenizer; public class ScriptMetaData extends ScriptEntry { private boolean hasSource = false; - private String locationPlaceHolder = ""; + private final String locationPlaceHolder = ""; private String source; - private Parcel parent; + private final Parcel parent; public ScriptMetaData(Parcel parent, ScriptEntry entry, diff --git a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java index 64269f3dd740..ec22608f31f7 100644 --- a/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/UnoPkgContainer.java @@ -38,10 +38,9 @@ import java.util.Map; public class UnoPkgContainer extends ParcelContainer { - private Map<String, ParcelContainer> registeredPackages = new - HashMap<String, ParcelContainer>(); - private String extensionDb; - private String extensionRepository; + private final Map<String, ParcelContainer> registeredPackages = new HashMap<String, ParcelContainer>(); + private final String extensionDb; + private final String extensionRepository; public UnoPkgContainer(XComponentContext xCtx, String locationURL, String _extensionDb, String _extensionRepository, diff --git a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java index 0e25745a1b38..c34908f8c773 100644 --- a/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java +++ b/scripting/java/com/sun/star/script/framework/container/XMLParserFactory.java @@ -54,7 +54,7 @@ public class XMLParserFactory { private static class DefaultParser implements XMLParser { - private DocumentBuilderFactory factory; + private final DocumentBuilderFactory factory; public DefaultParser() { factory = DocumentBuilderFactory.newInstance(); diff --git a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java index 3c27b0367d38..e7c6fdb15236 100644 --- a/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java +++ b/scripting/java/com/sun/star/script/framework/io/UCBStreamHandler.java @@ -46,9 +46,8 @@ public class UCBStreamHandler extends URLStreamHandler { public final static String separator = "/ucb/"; - private XSimpleFileAccess m_xSimpleFileAccess = null; - private HashMap<String, InputStream> m_jarStreamMap = new - HashMap<String, InputStream>(12); + private final XSimpleFileAccess m_xSimpleFileAccess; + private final HashMap<String, InputStream> m_jarStreamMap = new HashMap<String, InputStream>(12); private static String m_ucbscheme; public UCBStreamHandler(String scheme, XSimpleFileAccess xSFA) { diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java index 90766c51c553..a6c5d69d7941 100644 --- a/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java +++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamImpl.java @@ -25,7 +25,7 @@ import java.io.InputStream; public class XInputStreamImpl implements XInputStream { - private InputStream is; + private final InputStream is; public XInputStreamImpl(InputStream is) { this.is = is; diff --git a/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java b/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java index 10cb1db52888..654f0e24c01e 100644 --- a/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java +++ b/scripting/java/com/sun/star/script/framework/io/XInputStreamWrapper.java @@ -24,7 +24,7 @@ import java.io.InputStream; public class XInputStreamWrapper extends InputStream { - private XInputStream m_xInputStream; + private final XInputStream m_xInputStream; public XInputStreamWrapper(XInputStream xInputStream) { m_xInputStream = xInputStream; diff --git a/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java b/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java index 542fb0ae9422..16357fd17017 100644 --- a/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java +++ b/scripting/java/com/sun/star/script/framework/io/XOutputStreamWrapper.java @@ -24,7 +24,7 @@ import java.io.OutputStream; public class XOutputStreamWrapper extends OutputStream { - private XOutputStream m_xOutputStream; + private final XOutputStream m_xOutputStream; public XOutputStreamWrapper(XOutputStream xOs) { this.m_xOutputStream = xOs; diff --git a/scripting/java/com/sun/star/script/framework/provider/EditorScriptContext.java b/scripting/java/com/sun/star/script/framework/provider/EditorScriptContext.java index c6165818b6b7..d107edcc74c6 100644 --- a/scripting/java/com/sun/star/script/framework/provider/EditorScriptContext.java +++ b/scripting/java/com/sun/star/script/framework/provider/EditorScriptContext.java @@ -29,8 +29,8 @@ import com.sun.star.uno.XComponentContext; public class EditorScriptContext implements XScriptContext { - private XDesktop m_xDeskTop; - private XComponentContext m_xComponentContext; + private final XDesktop m_xDeskTop; + private final XComponentContext m_xComponentContext; public EditorScriptContext(XComponentContext xmComponentContext, XDesktop xDesktop) { diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java b/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java index 19f8bfc1080f..ab01797b9ccd 100644 --- a/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java +++ b/scripting/java/com/sun/star/script/framework/provider/ScriptContext.java @@ -44,12 +44,12 @@ public class ScriptContext extends PropertySet implements XScriptContext { private final static String DOC_URI = "SCRIPTING_DOC_URI"; - private XModel m_xModel = null; - private XScriptInvocationContext m_xInvocationContext = null; + private final XModel m_xModel; + private final XScriptInvocationContext m_xInvocationContext; - private XDesktop m_xDeskTop = null; + private final XDesktop m_xDeskTop; - private XComponentContext m_xComponentContext = null; + private final XComponentContext m_xComponentContext; private ScriptContext(XComponentContext xmComponentContext, XDesktop xDesktop, XModel xModel, XScriptInvocationContext xInvocContext) { diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java index d639e3669433..4d97d43c4718 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/PlainSourceView.java @@ -34,7 +34,7 @@ import javax.swing.event.DocumentListener; public class PlainSourceView extends JScrollPane implements ScriptSourceView, DocumentListener { - private ScriptSourceModel model; + private final ScriptSourceModel model; private JTextArea ta; private GlyphGutter gg; private int linecount; @@ -144,7 +144,7 @@ public class PlainSourceView extends JScrollPane implements class GlyphGutter extends JComponent { - private PlainSourceView view; + private final PlainSourceView view; private static final String DUMMY_STRING = "99"; GlyphGutter(PlainSourceView view) { diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java index 424c25969c37..8b02bd316d03 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java @@ -126,11 +126,11 @@ public class ScriptProviderForBeanShell { class ScriptImpl implements XScript { - private ScriptMetaData metaData; - private XComponentContext m_xContext; + private final ScriptMetaData metaData; + private final XComponentContext m_xContext; private XMultiComponentFactory m_xMultiComponentFactory; - private XModel m_xModel; - private XScriptInvocationContext m_xInvocContext; + private final XModel m_xModel; + private final XScriptInvocationContext m_xInvocContext; ScriptImpl(XComponentContext ctx, ScriptMetaData metaData, XModel xModel, XScriptInvocationContext xContext) throws diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java index 67041ff2cdb8..165f00844d70 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptSourceModel.java @@ -27,7 +27,7 @@ import java.net.URL; public class ScriptSourceModel { private int currentPosition = -1; - private URL file = null; + private final URL file; private ScriptSourceView view = null; public ScriptSourceModel(URL file) { diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptDescriptor.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptDescriptor.java index 1ca7cb540d00..ff56564b20df 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptDescriptor.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptDescriptor.java @@ -27,11 +27,11 @@ import java.util.StringTokenizer; */ public class ScriptDescriptor { - private String m_name; - private String m_methodName; - private String m_className; + private final String m_name; + private final String m_methodName; + private final String m_className; private List<String> m_classpath; - private ArrayList<Class<?>> m_argumentTypes = new ArrayList<Class<?>>(11); + private final ArrayList<Class<?>> m_argumentTypes = new ArrayList<Class<?>>(11); /** * Constructs a ScriptDescriptor for the given name diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java index a27b5e9755c4..fb18d34aadd3 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java @@ -52,7 +52,7 @@ public class ScriptProviderForJava { public static class _ScriptProviderForJava extends ScriptProvider { - private Resolver m_resolutionPolicy = new StrictResolver(); + private final Resolver m_resolutionPolicy = new StrictResolver(); public _ScriptProviderForJava(XComponentContext ctx) { super(ctx, "Java"); @@ -126,12 +126,12 @@ public class ScriptProviderForJava { class ScriptImpl implements XScript { - private ScriptMetaData metaData; - private XComponentContext m_xContext; - private XModel m_xModel; - private XScriptInvocationContext m_xInvocContext; + private final ScriptMetaData metaData; + private final XComponentContext m_xContext; + private final XModel m_xModel; + private final XScriptInvocationContext m_xInvocContext; private XMultiComponentFactory m_xMultiComponentFactory; - private Resolver m_resolutionPolicy; + private final Resolver m_resolutionPolicy; ScriptImpl(XComponentContext ctx, Resolver resolver, ScriptMetaData metaData, XModel xModel, XScriptInvocationContext xInvocContext) throws diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProxy.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProxy.java index e8ab74b4fb9b..921b282cc939 100644 --- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProxy.java +++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProxy.java @@ -28,7 +28,7 @@ import java.lang.reflect.Method; public class ScriptProxy { private Object m_targetObject; - private Method m_method; + private final Method m_method; /** * Constructs a <code>ScriptProxy</code> object for the given diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java index 4fb29852d303..41ab77c1879b 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java @@ -296,7 +296,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor { private class closeHandler implements Runnable { - private URL url; + private final URL url; private closeHandler(URL url) { this.url = url; diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index 25edc0f851dd..a2f78916a1b8 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -121,11 +121,11 @@ public class ScriptProviderForJavaScript { class ScriptImpl implements XScript { - private ScriptMetaData metaData; - private XComponentContext m_xContext; + private final ScriptMetaData metaData; + private final XComponentContext m_xContext; private XMultiComponentFactory m_xMultiComponentFactory; - private XModel m_xModel; - private XScriptInvocationContext m_xInvocContext; + private final XModel m_xModel; + private final XScriptInvocationContext m_xInvocContext; ScriptImpl(XComponentContext ctx, ScriptMetaData metaData, XModel xModel, XScriptInvocationContext xInvocContext) throws diff --git a/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java b/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java index b5432023f9e6..9c9eec41cefc 100644 --- a/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java +++ b/svl/qa/complex/passwordcontainer/MasterPasswdHandler.java @@ -28,7 +28,7 @@ import com.sun.star.uno.UnoRuntime; public class MasterPasswdHandler extends WeakBase implements XInteractionHandler { - private XInteractionHandler m_xHandler; + private final XInteractionHandler m_xHandler; public MasterPasswdHandler( XInteractionHandler xHandler ) { m_xHandler = xHandler; diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java index 34426256f8cf..77ec2a79f5d4 100644 --- a/sw/qa/complex/writer/LoadSaveTest.java +++ b/sw/qa/complex/writer/LoadSaveTest.java @@ -65,10 +65,10 @@ public class LoadSaveTest private XMultiServiceFactory m_xMSF = null; private XGlobalEventBroadcaster m_xGEB = null; - private String m_fileURL = "file://"; + private final String m_fileURL = "file://"; // these should be parameters or something? - private String m_SourceDir = "FIXME"; - private String m_TargetDir = "/tmp/out"; + private final String m_SourceDir = "FIXME"; + private final String m_TargetDir = "/tmp/out"; @Before public void before() throws Exception { diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java index b793b9ae3747..e5d64ef5d575 100644 --- a/sw/qa/complex/writer/TextPortionEnumerationTest.java +++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java @@ -74,7 +74,7 @@ import java.util.Stack; class TreeNodeEnum { - private Object[] m_Elements; + private final Object[] m_Elements; private int m_Pos; TreeNodeEnum(Object[] Elements) { m_Elements = Elements; m_Pos = 0; } boolean hasNext() { return m_Pos < m_Elements.length; } @@ -84,7 +84,7 @@ class TreeNodeEnum /** base class for tree nodes. only instance: root of tree. */ class TreeNode { - private List<TreeNode> m_Children; + private final List<TreeNode> m_Children; String getType() { return "__ROOT__"; } boolean hasContent() { return false; } boolean isNesting() { return false; } @@ -105,7 +105,7 @@ abstract class MarkNode extends TreeNode { boolean m_isPoint; boolean m_isStart = false; - private String m_Name; + private final String m_Name; boolean isPoint() { return m_isPoint; } boolean isStart() { return m_isStart; } String getName() { return m_Name; } @@ -237,7 +237,7 @@ class DocumentIndexMarkEndNode extends DocumentIndexMarkNode abstract class ContentNode extends TreeNode { - private String m_Content; + private final String m_Content; String getContent() { return m_Content; } @Override boolean hasContent() { return true; } @@ -286,8 +286,8 @@ class TextFieldNode extends ContentNode class FrameNode extends TreeNode { - private String m_Name; - private TextContentAnchorType m_Anchor; + private final String m_Name; + private final TextContentAnchorType m_Anchor; String getName() { return m_Name; } TextContentAnchorType getAnchor() { return m_Anchor; } @Override @@ -322,7 +322,7 @@ class FrameNode extends TreeNode class FootnoteNode extends TreeNode { - private String m_Label; + private final String m_Label; String getLabel() { return m_Label; } @Override FootnoteNode dup() { return new FootnoteNode(getLabel()); } @@ -342,7 +342,7 @@ class FootnoteNode extends TreeNode class ControlCharacterNode extends TreeNode { - private short m_Char; + private final short m_Char; short getChar() { return m_Char; } @Override ControlCharacterNode dup() { return new ControlCharacterNode(getChar()); } @@ -372,7 +372,7 @@ class SoftPageBreakNode extends TreeNode class HyperlinkNode extends TreeNode { - private String m_URL; + private final String m_URL; String getURL() { return m_URL; } @Override HyperlinkNode dup() { return new HyperlinkNode(getURL()); } @@ -397,7 +397,7 @@ class HyperlinkNode extends TreeNode class RubyNode extends TreeNode { - private String m_Ruby; + private final String m_Ruby; String getRubyText() { return m_Ruby; } @Override RubyNode dup() { return new RubyNode(getRubyText()); } @@ -422,7 +422,7 @@ class RubyNode extends TreeNode class MetaNode extends TreeNode { - private StringPair m_XmlId; + private final StringPair m_XmlId; StringPair getXmlId() { return m_XmlId; } @Override MetaNode dup() { return new MetaNode(getXmlId()); } @@ -459,9 +459,9 @@ class MetaFieldNode extends MetaNode class Range { - private short m_Start; - private short m_End; - private TreeNode m_Node; + private final short m_Start; + private final short m_End; + private final TreeNode m_Node; short getStart() { return m_Start; } short getExtent() { return (short) (m_End - m_Start); } TreeNode getNode() { return m_Node; } @@ -477,10 +477,10 @@ class FuzzyTester private long m_DiffNesting = 0; private long m_DiffSpuriousEmptyText = 0; private long m_DiffSequence = 0; // ignored? - private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackExpected; - private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackActual; - private List<TreeNode> m_BufferExpected; - private List<TreeNode> m_BufferActual; + private final Stack<Pair<TreeNode, TreeNodeEnum>> m_StackExpected; + private final Stack<Pair<TreeNode, TreeNodeEnum>> m_StackActual; + private final List<TreeNode> m_BufferExpected; + private final List<TreeNode> m_BufferActual; FuzzyTester() { m_BufferExpected = new ArrayList<TreeNode>(); @@ -659,7 +659,7 @@ class FuzzyTester class EnumConverter { - private Stack<TreeNode> m_Stack; + private final Stack<TreeNode> m_Stack; EnumConverter() { m_Stack = new Stack<TreeNode>(); @@ -832,7 +832,7 @@ class EnumConverter abstract class Inserter { - private XMultiServiceFactory m_xDocFactory; + private final XMultiServiceFactory m_xDocFactory; XText m_xText; XParagraphCursor m_xCursor; @@ -1025,10 +1025,10 @@ abstract class Inserter class TreeInserter extends Inserter { - private Map<String, XTextRange> m_BookmarkStarts; - private Map<String, XTextRange> m_ReferenceMarkStarts; - private Map<String, XTextRange> m_DocumentIndexMarkStarts; - private List<Pair<XTextRange, FrameNode>> m_FrameHints; + private final Map<String, XTextRange> m_BookmarkStarts; + private final Map<String, XTextRange> m_ReferenceMarkStarts; + private final Map<String, XTextRange> m_DocumentIndexMarkStarts; + private final List<Pair<XTextRange, FrameNode>> m_FrameHints; TreeInserter(XTextDocument xDoc) { diff --git a/swext/mediawiki/src/com/sun/star/wiki/Settings.java b/swext/mediawiki/src/com/sun/star/wiki/Settings.java index 74d60180ef28..9580f9ea4570 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/Settings.java +++ b/swext/mediawiki/src/com/sun/star/wiki/Settings.java @@ -40,10 +40,10 @@ public class Settings private static Settings m_instance; - private XComponentContext m_xContext; + private final XComponentContext m_xContext; private int lastUsedWikiServer = 0; - private List<Map<String, String>> m_WikiConnections = new ArrayList<Map<String, String>>(); - private List<Map<String, Object>> m_aWikiDocs = new ArrayList<Map<String, Object>>(); + private final List<Map<String, String>> m_WikiConnections = new ArrayList<Map<String, String>>(); + private final List<Map<String, Object>> m_aWikiDocs = new ArrayList<Map<String, Object>>(); private Settings( XComponentContext ctx ) { diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java index 6b87778808eb..e16db7156831 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java @@ -33,7 +33,7 @@ import com.sun.star.uno.XComponentContext; public class WikiArticle { - private XComponentContext m_xContext; + private final XComponentContext m_xContext; private String m_sEditTime = ""; private String m_sEditToken = ""; @@ -44,9 +44,9 @@ public class WikiArticle private String m_sWikiUser; private String m_sWikiPass; - private String m_sTitle = ""; + private final String m_sTitle; - private URI m_aMainURI; + private final URI m_aMainURI; private HostConfiguration m_aHostConfig; diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java index 2e262fb37356..aef6cb6a29b6 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java @@ -37,9 +37,9 @@ public class WikiEditSettingDialog extends WikiDialog private static final String sOKMethod = "OK"; - private String[] Methods = {sOKMethod }; - private Map<String,String> setting; - private boolean addMode; + private final String[] Methods = {sOKMethod }; + private final Map<String,String> setting; + private final boolean addMode; private boolean m_bAllowURLChange = true; public WikiEditSettingDialog( XComponentContext xContext, String DialogURL ) diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java index 15ece8c515df..3ad6b5c410b9 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java @@ -57,10 +57,10 @@ public final class WikiEditorImpl extends WeakBase private static final String protocolName = "vnd.com.sun.star.wiki:"; private final XComponentContext m_xContext; - private Map<String, com.sun.star.frame.XStatusListener> m_statusListeners = new HashMap<String, com.sun.star.frame.XStatusListener>(); + private final Map<String, com.sun.star.frame.XStatusListener> m_statusListeners = new HashMap<String, com.sun.star.frame.XStatusListener>(); private XFrame m_xFrame; private XModel m_xModel; - private Settings m_aSettings; + private final Settings m_aSettings; private String m_aFilterName; public WikiEditorImpl( XComponentContext xContext ) diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java index 9c7ff7939b3a..c3a1f462a89f 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiOptionsEventHandlerImpl.java @@ -49,7 +49,7 @@ public final class WikiOptionsEventHandlerImpl extends WeakBase private static final String sOk = "ok"; private static final String sBack = "back"; - private XComponentContext m_xContext; + private final XComponentContext m_xContext; private XDialog m_xDialog; private XControlContainer m_xControlContainer; diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java index 22d8e3d0a439..43fba5c24f84 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiPropDialog.java @@ -34,7 +34,7 @@ public class WikiPropDialog extends WikiDialog{ private static final String sArticleTextMethod = "ArticleTextChange"; private static final String sAddWikiMethod = "AddWiki"; - private String[] m_pMethods = {sSendMethod, sWikiListMethod, sArticleTextMethod, sAddWikiMethod}; + private final String[] m_pMethods = {sSendMethod, sWikiListMethod, sArticleTextMethod, sAddWikiMethod}; private String m_sWikiTitle = ""; private String m_sWikiEngineURL = ""; diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java index 4b7e6bae01bb..5788452f6477 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleComponent.java @@ -47,7 +47,7 @@ import com.sun.star.uno.XInterface; */ public class _XAccessibleComponent { - private XAccessibleComponent oObj = null; + private final XAccessibleComponent oObj; private Rectangle bounds = null ; diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java index e750ab0cb4d6..df7ef76abd4b 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleContext.java @@ -48,7 +48,7 @@ import util.AccessibilityTools; */ public class _XAccessibleContext { - private XAccessibleContext oObj = null; + private final XAccessibleContext oObj; private int childCount = 0; private XAccessible parent = null ; diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java index 66e5336d09f1..f94cb6f1d4b5 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleEventBroadcaster.java @@ -52,15 +52,15 @@ import com.sun.star.uno.UnoRuntime; */ public class _XAccessibleEventBroadcaster { - private XAccessibleEventBroadcaster oObj = null; - private EventProducer prod = null ; - private EvListener list = new EvListener(); + private final XAccessibleEventBroadcaster oObj; + private final EventProducer prod; + private final EvListener list = new EvListener(); /** * An event producer */ private static class EventProducer { - private XWindow xWindow; + private final XWindow xWindow; private EventProducer(XWindow window) { xWindow = window; } diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java index 24b1f4e6f42c..5055285f7c0c 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleExtendedComponent.java @@ -41,7 +41,7 @@ public class _XAccessibleExtendedComponent { private static final String className = "com.sun.star.accessibility.XAccessibleExtendedComponent" ; - private XAccessibleExtendedComponent oObj = null; + private final XAccessibleExtendedComponent oObj; // temporary while accessibility package is in com.sun.star protected String getTestedClassName() { diff --git a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java index 56d072cf07d2..575d569c805d 100644 --- a/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java +++ b/toolkit/qa/complex/toolkit/accessibility/_XAccessibleText.java @@ -64,18 +64,18 @@ import com.sun.star.uno.UnoRuntime; */ public class _XAccessibleText { - private XAccessibleText oObj = null; - private XMultiServiceFactory xMSF; + private final XAccessibleText oObj; + private final XMultiServiceFactory xMSF; private Rectangle chBounds = null; private int chCount = 0; private String text = null; - private String editOnly = null; + private final String editOnly; public _XAccessibleText(XInterface object, XMultiServiceFactory xMSF, String editOnly) { - oObj = UnoRuntime.queryInterface(XAccessibleText.class, object); + this.oObj = UnoRuntime.queryInterface(XAccessibleText.class, object); this.xMSF = xMSF; this.editOnly = editOnly; } diff --git a/toolkit/test/accessibility/AccessibilityTree.java b/toolkit/test/accessibility/AccessibilityTree.java index 0f7ed8f3141e..844065d3e3b6 100644 --- a/toolkit/test/accessibility/AccessibilityTree.java +++ b/toolkit/test/accessibility/AccessibilityTree.java @@ -293,13 +293,13 @@ public class AccessibilityTree return bIsPopup; } - private AccessibilityTree maTree; + private final AccessibilityTree maTree; } class NodeAction extends AbstractAction { - private int mnIndex; - private AccessibleTreeNode maNode; + private final int mnIndex; + private final AccessibleTreeNode maNode; public NodeAction( String aName, AccessibleTreeNode aNode, int nIndex ) { @@ -317,8 +317,8 @@ public class AccessibilityTree // This action expands all shapes in the subtree rooted in the specified node. class ShapeExpandAction extends AbstractAction { - private AccessibilityTree maTree; - private AccTreeNode maNode; + private final AccessibilityTree maTree; + private final AccTreeNode maNode; public ShapeExpandAction (AccessibilityTree aTree, AccTreeNode aNode) { super ("Expand Shapes"); @@ -334,8 +334,8 @@ public class AccessibilityTree // This action expands all nodes in the subtree rooted in the specified node. class SubtreeExpandAction extends AbstractAction { - private AccessibilityTree maTree; - private AccTreeNode maNode; + private final AccessibilityTree maTree; + private final AccTreeNode maNode; public SubtreeExpandAction (AccessibilityTree aTree, AccTreeNode aNode) { super ("Expand Subtree"); @@ -383,6 +383,6 @@ public class AccessibilityTree protected AccessibleTreeCellRenderer maCellRenderer; - private JTree maTree; + private final JTree maTree; private int mnExpandLevel; } diff --git a/toolkit/test/accessibility/AccessibilityTreeModel.java b/toolkit/test/accessibility/AccessibilityTreeModel.java index ce6b5013583b..cee0f86842b6 100644 --- a/toolkit/test/accessibility/AccessibilityTreeModel.java +++ b/toolkit/test/accessibility/AccessibilityTreeModel.java @@ -494,7 +494,7 @@ public class AccessibilityTreeModel private final XAccessibleEventListener mxListener; // Map to translate from accessible object to corresponding tree node. - private NodeMap maNodeMap; + private final NodeMap maNodeMap; // If the lock count is higher then zero, then no events are processed. private int mnLockCount; diff --git a/toolkit/test/accessibility/AccessibleActionNode.java b/toolkit/test/accessibility/AccessibleActionNode.java index fcb029b4d3cc..c1c927574c9c 100644 --- a/toolkit/test/accessibility/AccessibleActionNode.java +++ b/toolkit/test/accessibility/AccessibleActionNode.java @@ -63,5 +63,5 @@ class AccessibleActionNode JOptionPane.INFORMATION_MESSAGE); } - private int mnActionIndex; + private final int mnActionIndex; } diff --git a/toolkit/test/accessibility/AccessibleTreeNode.java b/toolkit/test/accessibility/AccessibleTreeNode.java index 9398385df714..a127402bd30d 100644 --- a/toolkit/test/accessibility/AccessibleTreeNode.java +++ b/toolkit/test/accessibility/AccessibleTreeNode.java @@ -29,7 +29,7 @@ class AccessibleTreeNode protected AccessibleTreeNode maParent; /// The object to be displayed. - private Object maDisplayObject; + private final Object maDisplayObject; public AccessibleTreeNode (Object aDisplayObject, AccessibleTreeNode aParent) { diff --git a/toolkit/test/accessibility/Canvas.java b/toolkit/test/accessibility/Canvas.java index aca2e1f209d5..0aeec9c24ea6 100644 --- a/toolkit/test/accessibility/Canvas.java +++ b/toolkit/test/accessibility/Canvas.java @@ -451,11 +451,11 @@ class Canvas mnScale; private CanvasShape maActiveObject; - private java.util.HashMap<AccTreeNode, CanvasShape> + private final java.util.HashMap<AccTreeNode, CanvasShape> maObjects; - private List<CanvasShape> + private final List<CanvasShape> maObjectList; - private List<AccTreeNode> + private final List<AccTreeNode> maNodes; private Rectangle maBoundingBox; diff --git a/toolkit/test/accessibility/CanvasShape.java b/toolkit/test/accessibility/CanvasShape.java index 41d82b1230c7..b0767e619a0b 100644 --- a/toolkit/test/accessibility/CanvasShape.java +++ b/toolkit/test/accessibility/CanvasShape.java @@ -299,24 +299,14 @@ class CanvasShape +"x"+maSize.width+"x"+maSize.height+"<"; } - private AccTreeNode - maNode; - private XAccessibleContext - mxContext; - private XAccessibleComponent - mxComponent; - private String - msDescription, - msName; - private Rectangle2D.Double - maShape; - private Point - maPosition; - private Dimension - maSize; - private Color - maFgColor, - maBgColor; + private final AccTreeNode maNode; + private final XAccessibleContext mxContext; + private final XAccessibleComponent mxComponent; + private String msDescription, msName; + private Rectangle2D.Double maShape; + private Point maPosition; + private Dimension maSize; + private Color maFgColor, maBgColor; private boolean // Highlighting objects is an internal concept. Corresponds to selection in the tree view. mbHighlighted, @@ -324,6 +314,5 @@ class CanvasShape mbSelected, // Set when the accessible object is focused. mbFocused; - private int - mnRole; + private int mnRole; } diff --git a/toolkit/test/accessibility/ChildEventHandler.java b/toolkit/test/accessibility/ChildEventHandler.java index 3a3eb5af30ff..e36f3502ad45 100644 --- a/toolkit/test/accessibility/ChildEventHandler.java +++ b/toolkit/test/accessibility/ChildEventHandler.java @@ -61,6 +61,6 @@ class ChildEventHandler } - private XAccessible mxOldChild; - private XAccessible mxNewChild; + private final XAccessible mxOldChild; + private final XAccessible mxNewChild; } diff --git a/toolkit/test/accessibility/EventListener.java b/toolkit/test/accessibility/EventListener.java index d4d1227ac774..43a53774a910 100644 --- a/toolkit/test/accessibility/EventListener.java +++ b/toolkit/test/accessibility/EventListener.java @@ -104,5 +104,5 @@ public class EventListener } - private AccessibilityTreeModel maTreeModel; + private final AccessibilityTreeModel maTreeModel; } diff --git a/toolkit/test/accessibility/EventQueue.java b/toolkit/test/accessibility/EventQueue.java index 684f4027eb1a..5658ce2414d6 100644 --- a/toolkit/test/accessibility/EventQueue.java +++ b/toolkit/test/accessibility/EventQueue.java @@ -133,9 +133,9 @@ class EventQueue } private static EventQueue maInstance = null; - private Object maMonitor; - private LinkedList<Runnable> maRegularQueue; - private LinkedList<Runnable> maDisposingQueue; + private final Object maMonitor; + private final LinkedList<Runnable> maRegularQueue; + private final LinkedList<Runnable> maDisposingQueue; } diff --git a/toolkit/test/accessibility/MessageArea.java b/toolkit/test/accessibility/MessageArea.java index 5b3c1946db14..1b83d567c77c 100644 --- a/toolkit/test/accessibility/MessageArea.java +++ b/toolkit/test/accessibility/MessageArea.java @@ -138,5 +138,5 @@ public class MessageArea private static MessageArea saInstance = null; - private JTextArea maText; + private final JTextArea maText; } diff --git a/toolkit/test/accessibility/NodeFactory.java b/toolkit/test/accessibility/NodeFactory.java index 8c288396e4a2..51b126a7a4ee 100644 --- a/toolkit/test/accessibility/NodeFactory.java +++ b/toolkit/test/accessibility/NodeFactory.java @@ -34,21 +34,6 @@ class NodeFactory private NodeFactory () { - maContextHandler = new AccessibleContextHandler(); - maTextHandler = new AccessibleTextHandler(); - maEditableTextHandler = new AccessibleEditableTextHandler(); - maComponentHandler = new AccessibleComponentHandler(); - maExtendedComponentHandler = new AccessibleExtendedComponentHandler(); - maActionHandler = new AccessibleActionHandler(); - maImageHandler = new AccessibleImageHandler(); - maTableHandler = new AccessibleTableHandler(); - maCellHandler = new AccessibleCellHandler(); - maHypertextHandler = new AccessibleHypertextHandler(); - maHyperlinkHandler = new AccessibleHyperlinkHandler(); - maSelectionHandler = new AccessibleSelectionHandler(); - maRelationHandler = new AccessibleRelationHandler(); - maTreeHandler = new AccessibleTreeHandler(); - maUNOHandler = new AccessibleUNOHandler(); } @@ -139,19 +124,19 @@ class NodeFactory private static NodeFactory maInstance = null; // default handlers - private NodeHandler maContextHandler = new AccessibleContextHandler(); - private NodeHandler maTextHandler = new AccessibleTextHandler(); - private NodeHandler maEditableTextHandler = new AccessibleEditableTextHandler(); - private NodeHandler maComponentHandler = new AccessibleComponentHandler(); - private NodeHandler maExtendedComponentHandler = new AccessibleExtendedComponentHandler(); - private NodeHandler maActionHandler = new AccessibleActionHandler(); - private NodeHandler maImageHandler = new AccessibleImageHandler(); - private NodeHandler maTableHandler = new AccessibleTableHandler(); - private NodeHandler maCellHandler = new AccessibleCellHandler(); - private NodeHandler maHypertextHandler = new AccessibleHypertextHandler(); - private NodeHandler maHyperlinkHandler = new AccessibleHyperlinkHandler(); - private NodeHandler maSelectionHandler = new AccessibleSelectionHandler(); - private NodeHandler maRelationHandler = new AccessibleRelationHandler(); - private NodeHandler maTreeHandler = new AccessibleTreeHandler(); - private NodeHandler maUNOHandler = new AccessibleUNOHandler(); + private final NodeHandler maContextHandler = new AccessibleContextHandler(); + private final NodeHandler maTextHandler = new AccessibleTextHandler(); + private final NodeHandler maEditableTextHandler = new AccessibleEditableTextHandler(); + private final NodeHandler maComponentHandler = new AccessibleComponentHandler(); + private final NodeHandler maExtendedComponentHandler = new AccessibleExtendedComponentHandler(); + private final NodeHandler maActionHandler = new AccessibleActionHandler(); + private final NodeHandler maImageHandler = new AccessibleImageHandler(); + private final NodeHandler maTableHandler = new AccessibleTableHandler(); + private final NodeHandler maCellHandler = new AccessibleCellHandler(); + private final NodeHandler maHypertextHandler = new AccessibleHypertextHandler(); + private final NodeHandler maHyperlinkHandler = new AccessibleHyperlinkHandler(); + private final NodeHandler maSelectionHandler = new AccessibleSelectionHandler(); + private final NodeHandler maRelationHandler = new AccessibleRelationHandler(); + private final NodeHandler maTreeHandler = new AccessibleTreeHandler(); + private final NodeHandler maUNOHandler = new AccessibleUNOHandler(); } diff --git a/toolkit/test/accessibility/NodeMap.java b/toolkit/test/accessibility/NodeMap.java index 6050aa2ef276..aaf4baafff02 100644 --- a/toolkit/test/accessibility/NodeMap.java +++ b/toolkit/test/accessibility/NodeMap.java @@ -126,5 +126,5 @@ class NodeMap - private HashMap<XAccessibleContext, AccessibleTreeNode> maXAccessibleToNode; + private final HashMap<XAccessibleContext, AccessibleTreeNode> maXAccessibleToNode; } diff --git a/toolkit/test/accessibility/OfficeConnection.java b/toolkit/test/accessibility/OfficeConnection.java index 43d4d2e24f9f..eb43847f95db 100644 --- a/toolkit/test/accessibility/OfficeConnection.java +++ b/toolkit/test/accessibility/OfficeConnection.java @@ -95,7 +95,7 @@ public class OfficeConnection } } - private int mnDefaultPort = 5678; + private final int mnDefaultPort; private static final String msDefaultHost = "localhost"; private XMultiServiceFactory maServiceManager = null; diff --git a/toolkit/test/accessibility/QueuedListener.java b/toolkit/test/accessibility/QueuedListener.java index 5235da380cd7..a34b33549734 100644 --- a/toolkit/test/accessibility/QueuedListener.java +++ b/toolkit/test/accessibility/QueuedListener.java @@ -64,7 +64,7 @@ class QueuedListener ); } - private EventListener maListener; + private final EventListener maListener; } diff --git a/toolkit/test/accessibility/QueuedTopWindowListener.java b/toolkit/test/accessibility/QueuedTopWindowListener.java index 921fef1a37fd..96778c718fae 100644 --- a/toolkit/test/accessibility/QueuedTopWindowListener.java +++ b/toolkit/test/accessibility/QueuedTopWindowListener.java @@ -93,5 +93,5 @@ class QueuedTopWindowListener ); } - private TopWindowListener maListener; + private final TopWindowListener maListener; } diff --git a/toolkit/test/accessibility/SelectionDialog.java b/toolkit/test/accessibility/SelectionDialog.java index 10d8413b29f5..6f08532cce8e 100644 --- a/toolkit/test/accessibility/SelectionDialog.java +++ b/toolkit/test/accessibility/SelectionDialog.java @@ -199,5 +199,5 @@ class SelectionDialog extends JDialog private JList maChildrenSelector; private XAccessibleSelection mxSelection; - private AccTreeNode maNode; + private final AccTreeNode maNode; } diff --git a/toolkit/test/accessibility/TopWindowListener.java b/toolkit/test/accessibility/TopWindowListener.java index eeb781534292..3654b970099f 100644 --- a/toolkit/test/accessibility/TopWindowListener.java +++ b/toolkit/test/accessibility/TopWindowListener.java @@ -169,8 +169,8 @@ class TopWindowListener - private AccessibilityTreeModel + private final AccessibilityTreeModel maModel; - private SimpleOffice + private final SimpleOffice maOffice; } diff --git a/toolkit/test/accessibility/VectorNode.java b/toolkit/test/accessibility/VectorNode.java index 68cfbfd66844..c1ffcd650421 100644 --- a/toolkit/test/accessibility/VectorNode.java +++ b/toolkit/test/accessibility/VectorNode.java @@ -26,7 +26,7 @@ import com.sun.star.lang.IndexOutOfBoundsException; class VectorNode extends StringNode { - private ArrayList<AccessibleTreeNode> maChildren; + private final ArrayList<AccessibleTreeNode> maChildren; public VectorNode (String sDisplayObject, AccessibleTreeNode aParent) { diff --git a/toolkit/test/accessibility/ov/ContextView.java b/toolkit/test/accessibility/ov/ContextView.java index a687d7eb61d5..0751ef86e030 100644 --- a/toolkit/test/accessibility/ov/ContextView.java +++ b/toolkit/test/accessibility/ov/ContextView.java @@ -133,7 +133,7 @@ public class ContextView } - private JLabel + private final JLabel maName, maDescription, maRole; diff --git a/toolkit/test/accessibility/ov/FocusView.java b/toolkit/test/accessibility/ov/FocusView.java index 00a9258ad534..8ae028841c4e 100644 --- a/toolkit/test/accessibility/ov/FocusView.java +++ b/toolkit/test/accessibility/ov/FocusView.java @@ -135,7 +135,7 @@ public class FocusView Update (); } - private JLabel maFocused; - private JButton maGrabFocus; + private final JLabel maFocused; + private final JButton maGrabFocus; private XAccessibleComponent mxComponent; } diff --git a/toolkit/test/accessibility/ov/ObjectViewContainer.java b/toolkit/test/accessibility/ov/ObjectViewContainer.java index a22d61ebd9a6..e0b5cc08252e 100644 --- a/toolkit/test/accessibility/ov/ObjectViewContainer.java +++ b/toolkit/test/accessibility/ov/ObjectViewContainer.java @@ -165,7 +165,7 @@ public class ObjectViewContainer } } - private Border maViewBorder; + private final Border maViewBorder; /// List of view templates which are instantiated when new object is set. - private ArrayList<Class> maViewTemplates; + private final ArrayList<Class> maViewTemplates; } diff --git a/toolkit/test/accessibility/ov/StateSetView.java b/toolkit/test/accessibility/ov/StateSetView.java index 8933fb65c197..4829889e1b1d 100644 --- a/toolkit/test/accessibility/ov/StateSetView.java +++ b/toolkit/test/accessibility/ov/StateSetView.java @@ -258,7 +258,7 @@ public static class StateSetSetView } } - private JLabel maStates; + private final JLabel maStates; } } diff --git a/toolkit/test/accessibility/ov/TextView.java b/toolkit/test/accessibility/ov/TextView.java index a38b426b2cf1..9962645b5180 100644 --- a/toolkit/test/accessibility/ov/TextView.java +++ b/toolkit/test/accessibility/ov/TextView.java @@ -132,7 +132,7 @@ public class TextView } } - private JLabel + private final JLabel maTextLabel, maCaretPositionLabel; private XAccessibleText mxText; diff --git a/ucb/qa/complex/tdoc/_XChild.java b/ucb/qa/complex/tdoc/_XChild.java index 8d80e7856f46..ad23bf180152 100644 --- a/ucb/qa/complex/tdoc/_XChild.java +++ b/ucb/qa/complex/tdoc/_XChild.java @@ -36,7 +36,7 @@ public class _XChild { public XChild oObj = null; private Object gotten = null; - private LogWriter log = null; + private final LogWriter log = null; /** diff --git a/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java index d4bedba2235f..01297c0936a7 100644 --- a/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java +++ b/ucb/qa/complex/tdoc/_XCommandInfoChangeNotifier.java @@ -26,7 +26,7 @@ import com.sun.star.ucb.XCommandInfoChangeNotifier; public class _XCommandInfoChangeNotifier { public XCommandInfoChangeNotifier oObj = null; - private CommandInfoChangeListener listener = new CommandInfoChangeListener(); + private final CommandInfoChangeListener listener = new CommandInfoChangeListener(); public boolean _addCommandInfoChangeListener() { oObj.addCommandInfoChangeListener(listener); diff --git a/ucb/qa/complex/tdoc/_XCommandProcessor.java b/ucb/qa/complex/tdoc/_XCommandProcessor.java index f1598217ba96..fba9912c1001 100644 --- a/ucb/qa/complex/tdoc/_XCommandProcessor.java +++ b/ucb/qa/complex/tdoc/_XCommandProcessor.java @@ -71,7 +71,7 @@ public class _XCommandProcessor { * Conatins the tested object. */ public XCommandProcessor oObj; - private LogWriter log = null; + private final LogWriter log = null; private XMultiServiceFactory xMSF = null; /** diff --git a/ucb/qa/complex/tdoc/_XComponent.java b/ucb/qa/complex/tdoc/_XComponent.java index dc09c04f6440..13958ec51169 100644 --- a/ucb/qa/complex/tdoc/_XComponent.java +++ b/ucb/qa/complex/tdoc/_XComponent.java @@ -38,7 +38,7 @@ import share.LogWriter; public class _XComponent { public static XComponent oObj = null; - private LogWriter log = null; + private final LogWriter log = null; private boolean listenerDisposed[] = new boolean[2]; private String[] Loutput = new String[2]; @@ -65,8 +65,8 @@ public class _XComponent { } } - private XEventListener listener1 = new MyEventListener(); - private XEventListener listener2 = new MyEventListener2(); + private final XEventListener listener1 = new MyEventListener(); + private final XEventListener listener2 = new MyEventListener2(); /** * For the cfgmgr2.OSetElement tests: dispose the owner element. diff --git a/ucb/qa/complex/tdoc/_XContent.java b/ucb/qa/complex/tdoc/_XContent.java index 735c40167eaa..327439c8573f 100644 --- a/ucb/qa/complex/tdoc/_XContent.java +++ b/ucb/qa/complex/tdoc/_XContent.java @@ -24,7 +24,7 @@ import share.LogWriter; public class _XContent { public XContent oObj = null; - private LogWriter log = null; + private final LogWriter log = null; private ContentListener listener = null; public boolean _addContentEventListener() { diff --git a/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java index a3c8692ab911..14d9639cd8c1 100644 --- a/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java +++ b/ucb/qa/complex/tdoc/_XPropertiesChangeNotifier.java @@ -27,8 +27,8 @@ public class _XPropertiesChangeNotifier { public XPropertiesChangeNotifier oObj = null; - private PropertiesChangeListener listener = new PropertiesChangeListener(); - private String[] args = null; + private final PropertiesChangeListener listener = new PropertiesChangeListener(); + private String[] args; public boolean _addPropertiesChangeListener() { diff --git a/ucb/qa/complex/tdoc/_XPropertyContainer.java b/ucb/qa/complex/tdoc/_XPropertyContainer.java index 7bb5fa01ec0a..a5c996b83964 100644 --- a/ucb/qa/complex/tdoc/_XPropertyContainer.java +++ b/ucb/qa/complex/tdoc/_XPropertyContainer.java @@ -22,7 +22,7 @@ import share.LogWriter; public class _XPropertyContainer { public XPropertyContainer oObj = null; - private LogWriter log = null; + private final LogWriter log = null; public boolean _addProperty() { boolean result = true; diff --git a/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java index 7461f1df137b..f69829ce5d49 100644 --- a/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java +++ b/ucb/qa/complex/tdoc/_XPropertySetInfoChangeNotifier.java @@ -27,7 +27,7 @@ public class _XPropertySetInfoChangeNotifier { public XPropertySetInfoChangeNotifier oObj = null; - private PropertySetInfoChangeListener listener = new PropertySetInfoChangeListener(); + private final PropertySetInfoChangeListener listener = new PropertySetInfoChangeListener(); diff --git a/ucb/qa/complex/tdoc/_XServiceInfo.java b/ucb/qa/complex/tdoc/_XServiceInfo.java index 63f979b75618..a58b6ac4b0da 100644 --- a/ucb/qa/complex/tdoc/_XServiceInfo.java +++ b/ucb/qa/complex/tdoc/_XServiceInfo.java @@ -35,7 +35,7 @@ import share.LogWriter; public class _XServiceInfo { public static XServiceInfo oObj = null; private static String[] names = null; - private LogWriter log = null; + private final LogWriter log = null; /** * Just calls the method.<p> diff --git a/ucb/qa/complex/tdoc/_XTypeProvider.java b/ucb/qa/complex/tdoc/_XTypeProvider.java index 2622db30f946..506566dc4244 100644 --- a/ucb/qa/complex/tdoc/_XTypeProvider.java +++ b/ucb/qa/complex/tdoc/_XTypeProvider.java @@ -36,7 +36,7 @@ public class _XTypeProvider { public static XTypeProvider oObj = null; private static Type[] types = null; - private LogWriter log = null; + private final LogWriter log = null; /** * Just calls the method.<p> diff --git a/ucb/test/com/sun/star/comp/ucb/GlobalTransfer_Test.java b/ucb/test/com/sun/star/comp/ucb/GlobalTransfer_Test.java index b3e159769efa..5f3c91b2b4a1 100644 --- a/ucb/test/com/sun/star/comp/ucb/GlobalTransfer_Test.java +++ b/ucb/test/com/sun/star/comp/ucb/GlobalTransfer_Test.java @@ -99,8 +99,8 @@ public final class GlobalTransfer_Test extends ComplexTestCase { } private final class ResourceCopier { - private XCommandProcessor m_cmdProc = null; - private CommandEnvironment m_env = new CommandEnvironment(); + private final XCommandProcessor m_cmdProc; + private final CommandEnvironment m_env = new CommandEnvironment(); ResourceCopier( XCommandProcessor oCmdProc ) { diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java index 5a1acf6daa54..4d5630824e90 100644 --- a/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java +++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocument.java @@ -313,7 +313,7 @@ public class OfficeDocument return (XInterface) xORB.createInstanceWithArguments( serviceSpecifier, arguments ); } - private XMultiServiceFactory m_orb; + private final XMultiServiceFactory m_orb; private XComponent m_documentComponent; } diff --git a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java index 41f51b377a52..e309504a42c0 100644 --- a/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java +++ b/unotest/source/java/org/openoffice/test/tools/OfficeDocumentView.java @@ -35,9 +35,9 @@ import com.sun.star.util.XURLTransformer; */ public class OfficeDocumentView { - private XMultiServiceFactory m_orb; - private XController m_controller; - private OfficeDocument m_document; + private final XMultiServiceFactory m_orb; + private final XController m_controller; + private final OfficeDocument m_document; /* ------------------------------------------------------------------ */ final public XController getController() diff --git a/vcl/qa/complex/memCheck/CheckMemoryUsage.java b/vcl/qa/complex/memCheck/CheckMemoryUsage.java index 77d4acfdf78b..847172d83e93 100644 --- a/vcl/qa/complex/memCheck/CheckMemoryUsage.java +++ b/vcl/qa/complex/memCheck/CheckMemoryUsage.java @@ -70,7 +70,7 @@ import com.sun.star.util.XCloseable; class TempDir { - private String m_sTempDir; + private final String m_sTempDir; public TempDir(String _sTempDir) { @@ -99,7 +99,7 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ TempDir m_aTempDir; private String[][] sDocTypeExportFilter; private String[][] sDocuments; - private int iAllowMemoryIncrease = 10; + private final int iAllowMemoryIncrease = 10; private int iExportDocCount = 25; /** * The test parameters @@ -512,7 +512,7 @@ public class CheckMemoryUsage /* extends ComplexTestCase */ private class FileFilter implements FilenameFilter { - private String suffix = null; + private final String suffix; /** * C'tor. diff --git a/vcl/qa/complex/persistent_window_states/DocumentHandle.java b/vcl/qa/complex/persistent_window_states/DocumentHandle.java index dc45ab10cc7d..65ba8b1532c7 100644 --- a/vcl/qa/complex/persistent_window_states/DocumentHandle.java +++ b/vcl/qa/complex/persistent_window_states/DocumentHandle.java @@ -35,12 +35,12 @@ import helper.WindowListener; */ public class DocumentHandle { // the component loader to load a document - private XComponentLoader xCompLoader = null; + private final XComponentLoader xCompLoader; // the current window private XWindow xWin = null; // a own window listener - private WindowListener wl = null; + private final WindowListener wl; /** * Constructor diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.java b/wizards/com/sun/star/wizards/common/ConfigSet.java index 9b8b6478d8ad..75705c09fd21 100644 --- a/wizards/com/sun/star/wizards/common/ConfigSet.java +++ b/wizards/com/sun/star/wizards/common/ConfigSet.java @@ -28,9 +28,9 @@ import org.w3c.dom.*; public class ConfigSet implements ConfigNode, XMLProvider, ListModel { - private Class<?> childClass; - private Map<String, Object> childrenMap = new HashMap<String, Object>(); - private List<Object> childrenList = new ArrayList<Object>(); + private final Class<?> childClass; + private final Map<String, Object> childrenMap = new HashMap<String, Object>(); + private final List<Object> childrenList = new ArrayList<Object>(); public Object root; /** * After reading the configuration set items, diff --git a/wizards/com/sun/star/wizards/common/Helper.java b/wizards/com/sun/star/wizards/common/Helper.java index 9b62dd081b26..9d6b79aaa4d6 100644 --- a/wizards/com/sun/star/wizards/common/Helper.java +++ b/wizards/com/sun/star/wizards/common/Helper.java @@ -291,10 +291,10 @@ public class Helper public static class DateUtils { - private long docNullTime; - private XNumberFormatter formatter; - private XNumberFormatsSupplier formatSupplier; - private Calendar calendar; + private final long docNullTime; + private final XNumberFormatter formatter; + private final XNumberFormatsSupplier formatSupplier; + private final Calendar calendar; public DateUtils(XMultiServiceFactory xmsf, Object document) throws Exception { diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.java b/wizards/com/sun/star/wizards/common/NumberFormatter.java index c8086716f760..cd9b2b232d32 100644 --- a/wizards/com/sun/star/wizards/common/NumberFormatter.java +++ b/wizards/com/sun/star/wizards/common/NumberFormatter.java @@ -47,8 +47,8 @@ public class NumberFormatter public XNumberFormats xNumberFormats; public XNumberFormatTypes xNumberFormatTypes; public XPropertySet xNumberFormatSettings; - private boolean bNullDateCorrectionIsDefined = false; - private Locale aLocale; + private final boolean bNullDateCorrectionIsDefined = false; + private final Locale aLocale; public NumberFormatter(XMultiServiceFactory _xMSF, XNumberFormatsSupplier _xNumberFormatsSupplier, Locale _aLocale) throws Exception diff --git a/wizards/com/sun/star/wizards/common/NumericalHelper.java b/wizards/com/sun/star/wizards/common/NumericalHelper.java index 2c93b0c876b1..557b31bb377c 100644 --- a/wizards/com/sun/star/wizards/common/NumericalHelper.java +++ b/wizards/com/sun/star/wizards/common/NumericalHelper.java @@ -1188,7 +1188,7 @@ public class NumericalHelper private static class TransformNumToHex { - private StringBuffer val; + private final StringBuffer val; public TransformNumToHex(long number) { diff --git a/wizards/com/sun/star/wizards/common/UCB.java b/wizards/com/sun/star/wizards/common/UCB.java index 7e612916fca5..e7500a62910b 100644 --- a/wizards/com/sun/star/wizards/common/UCB.java +++ b/wizards/com/sun/star/wizards/common/UCB.java @@ -48,8 +48,8 @@ import com.sun.star.uno.UnoRuntime; public class UCB { - private Object ucb; - private FileAccess fa; + private final Object ucb; + private final FileAccess fa; public UCB(XMultiServiceFactory xmsf) throws Exception { diff --git a/wizards/com/sun/star/wizards/db/RelationController.java b/wizards/com/sun/star/wizards/db/RelationController.java index b37457ef9986..d08a13a60d76 100644 --- a/wizards/com/sun/star/wizards/db/RelationController.java +++ b/wizards/com/sun/star/wizards/db/RelationController.java @@ -33,14 +33,14 @@ import com.sun.star.wizards.common.PropertyNames; public class RelationController extends CommandName { - private int PKTABLE_CAT = 1; - private int PKTABLE_SCHEM = 2; - private int PKTABLE_NAME = 3; - private int PKCOLUMN_NAME = 4; - private int FKTABLE_CAT = 5; - private int FKTABLE_SCHEM = 6; - private int FKTABLE_NAME = 7; - private int FKCOLUMN_NAME = 8; + private final int PKTABLE_CAT = 1; + private final int PKTABLE_SCHEM = 2; + private final int PKTABLE_NAME = 3; + private final int PKCOLUMN_NAME = 4; + private final int FKTABLE_CAT = 5; + private final int FKTABLE_SCHEM = 6; + private final int FKTABLE_NAME = 7; + private final int FKCOLUMN_NAME = 8; public RelationController(CommandMetaData _CommandMetaData, String _CatalogName, String _SchemaName, String _TableName, boolean _baddQuotation) { diff --git a/wizards/com/sun/star/wizards/db/TableDescriptor.java b/wizards/com/sun/star/wizards/db/TableDescriptor.java index 6d37a675a5f0..68b2e95317ea 100644 --- a/wizards/com/sun/star/wizards/db/TableDescriptor.java +++ b/wizards/com/sun/star/wizards/db/TableDescriptor.java @@ -64,8 +64,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private XAppend xKeyAppend; private XDrop xKeyDrop; private String[] sTableFilters = null; - private ArrayList<ColumnDescriptor> columncontainer; - private ArrayList<XPropertySet> keycolumncontainer; + private final ArrayList<ColumnDescriptor> columncontainer; + private final ArrayList<XPropertySet> keycolumncontainer; public XHierarchicalNameAccess xTableHierarchicalNameAccess; private CommandName ComposedTableName; private XAppend xKeyColAppend; @@ -73,8 +73,8 @@ public class TableDescriptor extends CommandMetaData implements XContainerListen private XPropertySet xKey; private boolean bIDFieldisInserted = false; private String IDFieldName = PropertyNames.EMPTY_STRING; - private String sColumnAlreadyExistsMessage = PropertyNames.EMPTY_STRING; - private XWindow xWindow; + private final String sColumnAlreadyExistsMessage; + private final XWindow xWindow; public TableDescriptor(XMultiServiceFactory xMSF, XWindow _xWindow, String _sColumnAlreadyExistsMessage) { diff --git a/wizards/com/sun/star/wizards/db/TypeInspector.java b/wizards/com/sun/star/wizards/db/TypeInspector.java index 277c72158103..d992d3477dcc 100644 --- a/wizards/com/sun/star/wizards/db/TypeInspector.java +++ b/wizards/com/sun/star/wizards/db/TypeInspector.java @@ -42,7 +42,7 @@ public class TypeInspector private boolean[] bisAutoIncrementableInfos; private int[] nMinScaleInfos; private int[] nMaxScaleInfos; - private int[] nNumericFallBackList = new int[] + private final int[] nNumericFallBackList = new int[] { DataType.INTEGER, DataType.FLOAT, DataType.REAL, DataType.DOUBLE, DataType.NUMERIC, DataType.DECIMAL }; diff --git a/wizards/com/sun/star/wizards/form/CallFormWizard.java b/wizards/com/sun/star/wizards/form/CallFormWizard.java index 4445937f1506..8adbfe389acb 100644 --- a/wizards/com/sun/star/wizards/form/CallFormWizard.java +++ b/wizards/com/sun/star/wizards/form/CallFormWizard.java @@ -86,7 +86,7 @@ public class CallFormWizard private static final String __serviceName = "com.sun.star.wizards.form.CallFormWizard"; /** The service manager, that gives access to all registered services. */ - private com.sun.star.lang.XMultiServiceFactory m_serviceFactory; + private final com.sun.star.lang.XMultiServiceFactory m_serviceFactory; /** This method is a member of the interface for initializing an object * directly after its creation. diff --git a/wizards/com/sun/star/wizards/form/DataEntrySetter.java b/wizards/com/sun/star/wizards/form/DataEntrySetter.java index e7787e58c5c1..f21817f529cc 100644 --- a/wizards/com/sun/star/wizards/form/DataEntrySetter.java +++ b/wizards/com/sun/star/wizards/form/DataEntrySetter.java @@ -30,10 +30,10 @@ import com.sun.star.wizards.common.PropertyNames; public class DataEntrySetter { - private XRadioButton optDisplayAllData; - private XCheckBox chknomodification; - private XCheckBox chknodeletion; - private XCheckBox chknoaddition; + private final XRadioButton optDisplayAllData; + private final XCheckBox chknomodification; + private final XCheckBox chknodeletion; + private final XCheckBox chknoaddition; public DataEntrySetter(WizardDialog CurUnoDialog) { diff --git a/wizards/com/sun/star/wizards/form/FormControlArranger.java b/wizards/com/sun/star/wizards/form/FormControlArranger.java index 5d16a3c19aba..b2ac659bb504 100644 --- a/wizards/com/sun/star/wizards/form/FormControlArranger.java +++ b/wizards/com/sun/star/wizards/form/FormControlArranger.java @@ -40,11 +40,11 @@ public class FormControlArranger public static final String LABELCONTROL = "LabelControl"; protected DatabaseControl[] DBControlList = null; - private XNameContainer xFormName; - private XMultiServiceFactory xMSF; + private final XNameContainer xFormName; + private final XMultiServiceFactory xMSF; private Control[] LabelControlList = null; - private XStatusIndicator xProgressBar; - private FieldColumn[] FieldColumns; + private final XStatusIndicator xProgressBar; + private final FieldColumn[] FieldColumns; // Control curLabelControl; private int icurArrangement; private boolean bIsFirstRun; @@ -56,7 +56,7 @@ public class FormControlArranger private static final int cHoriDistance = 300; private static final int cLabelGap = 100; private static final double CMAXREDUCTION = 0.7; - private FormHandler oFormHandler; + private final FormHandler oFormHandler; private int iReduceWidth; private int m_currentLabelPosX; private int m_currentLabelPosY; diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index d7ae4181fd2b..699d202dc7d3 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -43,12 +43,12 @@ import com.sun.star.wizards.ui.*; public class StyleApplier { - private XPropertySet xPageStylePropertySet; - private XMultiServiceFactory xMSF; - private XRadioButton optNoBorder; - private XRadioButton opt3DLook; - private XListBox lstStyles; - private FormDocument curFormDocument; + private final XPropertySet xPageStylePropertySet; + private final XMultiServiceFactory xMSF; + private final XRadioButton optNoBorder; + private final XRadioButton opt3DLook; + private final XListBox lstStyles; + private final FormDocument curFormDocument; private short iOldLayoutPos; private static final String SCHANGELAYOUT = "changeLayout"; private static final String SCHANGEBORDERTYPE = "changeBorderLayouts"; diff --git a/wizards/com/sun/star/wizards/form/UIControlArranger.java b/wizards/com/sun/star/wizards/form/UIControlArranger.java index b19c957f17ed..9c77005cb51c 100644 --- a/wizards/com/sun/star/wizards/form/UIControlArranger.java +++ b/wizards/com/sun/star/wizards/form/UIControlArranger.java @@ -36,15 +36,15 @@ import javax.swing.ListModel; public class UIControlArranger { - private FormWizard CurUnoDialog; - private FormDocument curFormDocument; + private final FormWizard CurUnoDialog; + private final FormDocument curFormDocument; private short curtabindex; - private XRadioButton optAlignLeft; - private XRadioButton optAlignRight; - private XControl flnLabelPlacement; - private String[] HelpTexts = new String[4]; - private ArrangeButtonList[] m_aArrangeList = new ArrangeButtonList[2]; - private Integer IControlStep; + private final XRadioButton optAlignLeft; + private final XRadioButton optAlignRight; + private final XControl flnLabelPlacement; + private final String[] HelpTexts = new String[4]; + private final ArrangeButtonList[] m_aArrangeList = new ArrangeButtonList[2]; + private final Integer IControlStep; private static final int SOBASEIMAGEYPOSITION = 66; private static final int SOIMAGELISTHEIGHT = 60; private static final String SOALIGNMETHOD = "alignLabelControls"; @@ -182,8 +182,8 @@ public class UIControlArranger private class ArrangeButtonList implements XItemListener { - private int formindex; - private ButtonList m_aButtonList = null; // new ImageList(); + private final int formindex; + private final ButtonList m_aButtonList; public ArrangeButtonList(int _formindex, ListModel model, String _sArrangementHeader) { diff --git a/wizards/com/sun/star/wizards/query/CallQueryWizard.java b/wizards/com/sun/star/wizards/query/CallQueryWizard.java index 204fe281dd66..181b67def1b8 100644 --- a/wizards/com/sun/star/wizards/query/CallQueryWizard.java +++ b/wizards/com/sun/star/wizards/query/CallQueryWizard.java @@ -91,7 +91,7 @@ public class CallQueryWizard private static final String __serviceName = "com.sun.star.wizards.query.CallQueryWizard"; /** The service manager, that gives access to all registered services. */ - private com.sun.star.lang.XMultiServiceFactory m_serviceFactory; + private final com.sun.star.lang.XMultiServiceFactory m_serviceFactory; /** This method is a member of the interface for initializing an object * directly after its creation. diff --git a/wizards/com/sun/star/wizards/query/Finalizer.java b/wizards/com/sun/star/wizards/query/Finalizer.java index c91f2eb69472..6cf03b67f251 100644 --- a/wizards/com/sun/star/wizards/query/Finalizer.java +++ b/wizards/com/sun/star/wizards/query/Finalizer.java @@ -34,11 +34,11 @@ import java.util.logging.Logger; public class Finalizer { - private QueryWizard m_queryWizard; - private String resQuery; - private XTextComponent m_aTxtTitle; - private XRadioButton xRadioDisplayQuery; - private QuerySummary CurDBMetaData; + private final QueryWizard m_queryWizard; + private final String resQuery; + private final XTextComponent m_aTxtTitle; + private final XRadioButton xRadioDisplayQuery; + private final QuerySummary CurDBMetaData; public Finalizer( QueryWizard i_queryWizard, QuerySummary _CurDBMetaData ) { diff --git a/wizards/com/sun/star/wizards/query/QuerySummary.java b/wizards/com/sun/star/wizards/query/QuerySummary.java index 120bef2933cd..f7fb1cdce48a 100644 --- a/wizards/com/sun/star/wizards/query/QuerySummary.java +++ b/wizards/com/sun/star/wizards/query/QuerySummary.java @@ -33,10 +33,10 @@ public class QuerySummary extends QueryMetaData static final protected int RID_REPORT = 2400; String sSummary; Resource oResource; - private String sSeparator; - private String sReturnChar; - private String sAnd; - private String sOr; + private final String sSeparator; + private final String sReturnChar; + private final String sAnd; + private final String sOr; public QuerySummary(XMultiServiceFactory _xMSF, Resource _oResource) { diff --git a/wizards/com/sun/star/wizards/report/CallReportWizard.java b/wizards/com/sun/star/wizards/report/CallReportWizard.java index 70c418ad24ca..c64f9dea3833 100644 --- a/wizards/com/sun/star/wizards/report/CallReportWizard.java +++ b/wizards/com/sun/star/wizards/report/CallReportWizard.java @@ -117,7 +117,7 @@ public class CallReportWizard private static final String __serviceName = "com.sun.star.wizards.report.CallReportWizard"; /** The service manager, that gives access to all registered services. */ - private com.sun.star.lang.XMultiServiceFactory xmultiservicefactory; + private final com.sun.star.lang.XMultiServiceFactory xmultiservicefactory; /** This method is a member of the interface for initializing an object * directly after its creation. diff --git a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java index 7bd6138a83b9..cbadd8205d5a 100644 --- a/wizards/com/sun/star/wizards/report/GroupFieldHandler.java +++ b/wizards/com/sun/star/wizards/report/GroupFieldHandler.java @@ -31,7 +31,7 @@ public class GroupFieldHandler extends FieldSelection { private IReportDocument CurReportDocument; - private ArrayList<String> GroupFieldVector = new ArrayList<String>(); + private final ArrayList<String> GroupFieldVector = new ArrayList<String>(); private QueryMetaData CurDBMetaData; private static final short MAXSELFIELDS = 4; diff --git a/wizards/com/sun/star/wizards/report/ReportFinalizer.java b/wizards/com/sun/star/wizards/report/ReportFinalizer.java index 524ce2e1184d..415b7f5fda89 100644 --- a/wizards/com/sun/star/wizards/report/ReportFinalizer.java +++ b/wizards/com/sun/star/wizards/report/ReportFinalizer.java @@ -44,7 +44,7 @@ public class ReportFinalizer public static final int SOCREATEDOCUMENT = 1; public static final int SOCREATETEMPLATE = 2; public static final int SOUSETEMPLATE = 3; - private XMultiServiceFactory m_xMSF; + private final XMultiServiceFactory m_xMSF; public ReportFinalizer(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, WizardDialog _CurUnoDialog) { m_xMSF = _xMSF; diff --git a/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java b/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java index 765d85eb92a3..54b0bac36831 100644 --- a/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java +++ b/wizards/com/sun/star/wizards/report/ReportImplementationHelper.java @@ -24,7 +24,7 @@ public class ReportImplementationHelper { private RecordParser m_aCurDBMetaData; - private XMultiServiceFactory m_xMSF; + private final XMultiServiceFactory m_xMSF; protected int m_nDefaultPageOrientation; public ReportImplementationHelper(XMultiServiceFactory _aMSF, int _nOrientation) diff --git a/wizards/com/sun/star/wizards/report/ReportLayouter.java b/wizards/com/sun/star/wizards/report/ReportLayouter.java index 953e532c4e81..b62cf1c6f5cb 100644 --- a/wizards/com/sun/star/wizards/report/ReportLayouter.java +++ b/wizards/com/sun/star/wizards/report/ReportLayouter.java @@ -50,11 +50,11 @@ public class ReportLayouter public String[][] LayoutFiles; public String[][] ContentFiles; Object aOrientationImage; - private XMultiServiceFactory m_xMSF; + private final XMultiServiceFactory m_xMSF; private XTextRange trTitleconst, trAuthorconst, trDateconst, trPageconst; private TextElement teTitleconst, teAuthorconst, teDateconst, tePageconst; private List<XTextRange> constRangeList = new ArrayList<XTextRange>(); - private boolean isBuilderInstalled; + private final boolean isBuilderInstalled; public ReportLayouter(XMultiServiceFactory _xMSF, IReportDocument _CurReportDocument, UnoDialog _CurUnoDialog, boolean _isBuilderInstalled) { diff --git a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java index 77b1791310c9..60d14dd68b9a 100644 --- a/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java +++ b/wizards/com/sun/star/wizards/reportbuilder/layout/ReportBuilderLayouter.java @@ -74,7 +74,7 @@ abstract public class ReportBuilderLayouter implements IReportBuilderLayouter { private IReportDefinitionReadAccess m_xReportDefinitionReadAccess; - private Resource m_aResource; + private final Resource m_aResource; private String[][] m_aSortNames; /** diff --git a/wizards/com/sun/star/wizards/table/CallTableWizard.java b/wizards/com/sun/star/wizards/table/CallTableWizard.java index 40aff48a1cd5..5c4e35d7e9b1 100644 --- a/wizards/com/sun/star/wizards/table/CallTableWizard.java +++ b/wizards/com/sun/star/wizards/table/CallTableWizard.java @@ -92,7 +92,7 @@ public class CallTableWizard private static final String __serviceName = "com.sun.star.wizards.table.CallTableWizard"; /** The service manager, that gives access to all registered services. */ - private com.sun.star.lang.XMultiServiceFactory m_serviceFactory; + private final com.sun.star.lang.XMultiServiceFactory m_serviceFactory; /** This method is a member of the interface for initializing an object * directly after its creation. diff --git a/wizards/com/sun/star/wizards/table/FieldDescription.java b/wizards/com/sun/star/wizards/table/FieldDescription.java index d7ae9693d0c8..3979199c5787 100644 --- a/wizards/com/sun/star/wizards/table/FieldDescription.java +++ b/wizards/com/sun/star/wizards/table/FieldDescription.java @@ -33,7 +33,7 @@ public class FieldDescription { private String tablename = PropertyNames.EMPTY_STRING; private XPropertySet xPropertySet; - private ArrayList<PropertyValue> aPropertyValues; + private final ArrayList<PropertyValue> aPropertyValues; private String Name; public FieldDescription(XMultiServiceFactory _xMSF, Locale _aLocale, ScenarioSelector _curscenarioselector, String _fieldname, String keyname, int _nmaxcharCount) diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java index ffbce45d52c7..7ec9e5b5fa7e 100644 --- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java +++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java @@ -37,20 +37,20 @@ import com.sun.star.wizards.ui.XFieldSelectionListener; public class PrimaryKeyHandler implements XFieldSelectionListener { - private TableWizard CurUnoDialog; + private final TableWizard CurUnoDialog; private final static String SPRIMEKEYMODE = "togglePrimeKeyFields"; - private XRadioButton optAddAutomatically; - private XRadioButton optUseExisting; - private XRadioButton optUseSeveral; - private XCheckBox chkcreatePrimaryKey; - private XCheckBox chkApplyAutoValueExisting; - private XCheckBox chkApplyAutoValueAutomatic; - private XListBox lstSinglePrimeKey; - private XFixedText lblPrimeFieldName; - private FieldSelection curPrimaryKeySelection; + private final XRadioButton optAddAutomatically; + private final XRadioButton optUseExisting; + private final XRadioButton optUseSeveral; + private final XCheckBox chkcreatePrimaryKey; + private final XCheckBox chkApplyAutoValueExisting; + private final XCheckBox chkApplyAutoValueAutomatic; + private final XListBox lstSinglePrimeKey; + private final XFixedText lblPrimeFieldName; + private final FieldSelection curPrimaryKeySelection; private String[] fieldnames; - private TableDescriptor curTableDescriptor; - private boolean bAutoPrimaryKeysupportsAutoIncrmentation; + private final TableDescriptor curTableDescriptor; + private final boolean bAutoPrimaryKeysupportsAutoIncrmentation; private final static String SAUTOMATICKEYFIELDNAME = "ID"; public PrimaryKeyHandler(TableWizard _CurUnoDialog, TableDescriptor _curTableDescriptor) diff --git a/wizards/com/sun/star/wizards/table/ScenarioSelector.java b/wizards/com/sun/star/wizards/table/ScenarioSelector.java index 886549de8b9e..3d13ad939c4d 100644 --- a/wizards/com/sun/star/wizards/table/ScenarioSelector.java +++ b/wizards/com/sun/star/wizards/table/ScenarioSelector.java @@ -48,18 +48,18 @@ public class ScenarioSelector extends FieldSelection implements XItemListener, X final static int PRIVATE = 0; final static int BUSINESS = 1; - private XRadioButton optBusiness; + private final XRadioButton optBusiness; private XListBox xTableListBox; - private TableWizard CurTableWizardUnoDialog; - private TableDescriptor curtabledescriptor; - private CGCategory oCGCategory; + private final TableWizard CurTableWizardUnoDialog; + private final TableDescriptor curtabledescriptor; + private final CGCategory oCGCategory; protected CGTable oCGTable; - private String SELECTCATEGORY = "selectCategory"; + private final String SELECTCATEGORY = "selectCategory"; protected boolean bcolumnnameislimited; - private int imaxcolumnchars; - private String smytable; - private Locale aLocale; - private XMultiServiceFactory xMSF; + private final int imaxcolumnchars; + private final String smytable; + private final Locale aLocale; + private final XMultiServiceFactory xMSF; public ScenarioSelector(TableWizard _CurUnoDialog, TableDescriptor _curtabledescriptor, String _reslblFields, String _reslblSelFields) { diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java b/wizards/com/sun/star/wizards/text/TextDocument.java index 8898fcc172f5..e836a818656f 100644 --- a/wizards/com/sun/star/wizards/text/TextDocument.java +++ b/wizards/com/sun/star/wizards/text/TextDocument.java @@ -132,7 +132,7 @@ public class TextDocument public static class ModuleIdentifier { - private String m_identifier; + private final String m_identifier; protected final String getIdentifier() { diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.java b/wizards/com/sun/star/wizards/text/TextFieldHandler.java index e4fdb0915402..f98e37abcf55 100644 --- a/wizards/com/sun/star/wizards/text/TextFieldHandler.java +++ b/wizards/com/sun/star/wizards/text/TextFieldHandler.java @@ -46,7 +46,7 @@ public class TextFieldHandler { public XTextFieldsSupplier xTextFieldsSupplier; - private XMultiServiceFactory xMSFDoc; + private final XMultiServiceFactory xMSFDoc; /** * Creates a new instance of TextFieldHandler diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.java b/wizards/com/sun/star/wizards/text/TextSectionHandler.java index bdfea587ec24..d8bc579c6112 100644 --- a/wizards/com/sun/star/wizards/text/TextSectionHandler.java +++ b/wizards/com/sun/star/wizards/text/TextSectionHandler.java @@ -40,8 +40,8 @@ public class TextSectionHandler { public XTextSectionsSupplier xTextSectionsSupplier; - private XMultiServiceFactory xMSFDoc; - private XText xText; + private final XMultiServiceFactory xMSFDoc; + private final XText xText; /** Creates a new instance of TextSectionHandler */ public TextSectionHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument) diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.java b/wizards/com/sun/star/wizards/text/ViewHandler.java index c0a92184b63f..11134f13caaf 100644 --- a/wizards/com/sun/star/wizards/text/ViewHandler.java +++ b/wizards/com/sun/star/wizards/text/ViewHandler.java @@ -39,9 +39,9 @@ import com.sun.star.wizards.common.Helper; public class ViewHandler { - private XTextViewCursorSupplier xTextViewCursorSupplier; - private XStyleFamiliesSupplier xStyleFamiliesSupplier; - private XViewSettingsSupplier xViewSettingsSupplier; + private final XTextViewCursorSupplier xTextViewCursorSupplier; + private final XStyleFamiliesSupplier xStyleFamiliesSupplier; + private final XViewSettingsSupplier xViewSettingsSupplier; /** Creates a new instance of View */ public ViewHandler(XMultiServiceFactory xMSF, XTextDocument xTextDocument) diff --git a/wizards/com/sun/star/wizards/ui/ButtonList.java b/wizards/com/sun/star/wizards/ui/ButtonList.java index 60cf7f77a4a8..73a1cae141ee 100644 --- a/wizards/com/sun/star/wizards/ui/ButtonList.java +++ b/wizards/com/sun/star/wizards/ui/ButtonList.java @@ -56,8 +56,8 @@ public class ButtonList implements XItemEventBroadcaster, XActionListener private Size selectionGap = new Size(2, 2); private boolean showButtons = true; private Short step; - private boolean refreshOverNull = true; - private int imageTextLines = 1; + private final boolean refreshOverNull = true; + private final int imageTextLines = 1; private boolean rowSelect = false; public int tabIndex; public Boolean scaleImages = Boolean.TRUE; diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index f7ded90df20a..48e01d0f1967 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -39,9 +39,9 @@ public class CommandFieldSelection extends FieldSelection implements Comparator< private String sTablePrefix; private short m_iSelPos = -1; private short iOldSelPos = -1; - private boolean bpreselectCommand = true; + private final boolean bpreselectCommand = true; private boolean bgetQueries; - private WizardDialog oWizardDialog; + private final WizardDialog oWizardDialog; private Collator aCollator = null; class ItemListenerImpl implements com.sun.star.awt.XItemListener diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.java b/wizards/com/sun/star/wizards/ui/DocumentPreview.java index d5f2e9653a99..d989b10224fc 100644 --- a/wizards/com/sun/star/wizards/ui/DocumentPreview.java +++ b/wizards/com/sun/star/wizards/ui/DocumentPreview.java @@ -41,7 +41,7 @@ public class DocumentPreview * The content component of the frame. */ private XComponent xComponent; - private XControl xControl; + private final XControl xControl; private PropertyValue[] loadArgs; private String url; public static final int PREVIEW_MODE = 1; diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index f306314dc9c3..155a0c12ff97 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -52,18 +52,18 @@ import java.util.logging.Logger; public class FilterComponent { - private Integer IStep; - private int RowCount; + private final Integer IStep; + private final int RowCount; private static String[] sLogicOperators; - private XRadioButton optMatchAny; - private String slblFieldNames; - private String slblOperators; - private String slblValue; + private final XRadioButton optMatchAny; + private final String slblFieldNames; + private final String slblOperators; + private final String slblValue; WizardDialog CurUnoDialog; - private int BaseID = 2300; - private String sIncSuffix; - private ControlRow[] oControlRows; - private String sDuplicateCondition; + private final int BaseID = 2300; + private final String sIncSuffix; + private final ControlRow[] oControlRows; + private final String sDuplicateCondition; static final int SOOPTORMODE = 100; static final int SOOPTANDMODE = 101; QueryMetaData oQueryMetaData; diff --git a/wizards/com/sun/star/wizards/ui/ImageList.java b/wizards/com/sun/star/wizards/ui/ImageList.java index def1e0bee8ef..9b3bfd3bcde0 100644 --- a/wizards/com/sun/star/wizards/ui/ImageList.java +++ b/wizards/com/sun/star/wizards/ui/ImageList.java @@ -61,8 +61,8 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private boolean showButtons = true; private Short step; private final static Short NO_BORDER = Short.valueOf((short) 0); - private boolean refreshOverNull = true; - private int imageTextLines = 1; + private final boolean refreshOverNull = true; + private final int imageTextLines = 1; private boolean rowSelect = false; public int tabIndex; public Boolean scaleImages = Boolean.TRUE; @@ -70,7 +70,7 @@ public class ImageList implements XItemEventBroadcaster, ListDataListener private int selected = -1; private int pageStart = 0; public int helpURL = 0; - private CommonListener uiEventListener = new CommonListener(); + private final CommonListener uiEventListener = new CommonListener(); private IImageRenderer renderer; private ListModel listModel; public IRenderer counterRenderer = new SimpleCounterRenderer(); diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.java b/wizards/com/sun/star/wizards/ui/PeerConfig.java index 8b2615a780d6..e82e287170d3 100644 --- a/wizards/com/sun/star/wizards/ui/PeerConfig.java +++ b/wizards/com/sun/star/wizards/ui/PeerConfig.java @@ -32,7 +32,7 @@ import com.sun.star.wizards.common.PropertyNames; public class PeerConfig implements XWindowListener { - private ArrayList<PeerTask> m_aPeerTasks = new ArrayList<PeerTask>(); + private final ArrayList<PeerTask> m_aPeerTasks = new ArrayList<PeerTask>(); ArrayList<ControlTask> aControlTasks = new ArrayList<ControlTask>(); ArrayList<ImageUrlTask> aImageUrlTasks = new ArrayList<ImageUrlTask>(); UnoDialog oUnoDialog = null; diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 4fe8221d5a2c..81d05e722140 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -49,7 +49,7 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL private static final String CANCEL_ACTION_PERFORMED = "cancelWizard_1"; private static final String HELP_ACTION_PERFORMED = "callHelp"; public VetoableChangeSupport vetos = new VetoableChangeSupport(this); - private int iButtonWidth = 50; + private final int iButtonWidth = 50; private int nNewStep = 1; private int nOldStep = 1; private int nMaxStep = 1; @@ -60,9 +60,9 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL private Object oRoadmap; private XSingleServiceFactory xSSFRoadmap; public XIndexContainer xIndexContRoadmap; - private Resource oWizardResource; + private final Resource oWizardResource; public String sMsgEndAutopilot; - private int hid; + private final int hid; private boolean bTerminateListenermustberemoved = true; /** Creates a new instance of WizardDialog diff --git a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java index cfbd831c6d1c..488c9fd4c580 100644 --- a/wizards/com/sun/star/wizards/ui/event/AbstractListener.java +++ b/wizards/com/sun/star/wizards/ui/event/AbstractListener.java @@ -41,7 +41,7 @@ import java.util.HashMap; public class AbstractListener { - private HashMap<String,MethodInvocation> mHashtable = new HashMap<String,MethodInvocation>(); + private final HashMap<String,MethodInvocation> mHashtable = new HashMap<String,MethodInvocation>(); public void add(String componentName, String eventName, String methodName, Object target) { diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 057cf6d7cc24..b7cf05eed905 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -252,11 +252,11 @@ public abstract class DataAware { /** * the get method of the JavaBean-style property */ - private Method getMethod; + private final Method getMethod; /** * the set method of the JavaBean-style property */ - private Method setMethod; + private final Method setMethod; /** * creates a PropertyValue for the property with diff --git a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java index 0863ac10c49d..f10df1748420 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAwareFields.java @@ -98,7 +98,7 @@ public class DataAwareFields private static class BooleanFieldValue extends FieldValue { - private Class<?> convertTo; + private final Class<?> convertTo; public BooleanFieldValue(Field f, Class<?> convertTo_) { @@ -158,7 +158,7 @@ public class DataAwareFields private static class IntFieldValue extends FieldValue { - private Class<?> convertTo; + private final Class<?> convertTo; public IntFieldValue(Field f, Class<?> convertTo_) { @@ -218,7 +218,7 @@ public class DataAwareFields private static class DoubleFieldValue extends FieldValue { - private Class<?> convertTo; + private final Class<?> convertTo; public DoubleFieldValue(Field f, Class<?> convertTo_) { @@ -278,7 +278,7 @@ public class DataAwareFields private static class ConvertedStringValue extends FieldValue { - private Class<?> convertTo; + private final Class<?> convertTo; public ConvertedStringValue(Field f, Class<?> convertTo_) { diff --git a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java index d2b4b98f149a..f290312abd9b 100644 --- a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java +++ b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.java @@ -30,10 +30,10 @@ import com.sun.star.wizards.common.PropertyNames; public class ListModelBinder implements ListDataListener { - private XListBox unoList; - private Object unoListModel; + private final XListBox unoList; + private final Object unoListModel; private ListModel listModel; - private Renderer renderer = new Renderer() + private final Renderer renderer = new Renderer() { public String render(Object item) diff --git a/wizards/com/sun/star/wizards/ui/event/Task.java b/wizards/com/sun/star/wizards/ui/event/Task.java index b142e2444094..50ba5d6a158b 100644 --- a/wizards/com/sun/star/wizards/ui/event/Task.java +++ b/wizards/com/sun/star/wizards/ui/event/Task.java @@ -26,8 +26,8 @@ public class Task private int successful = 0; private int failed = 0; private int max = 0; - private String taskName; - private List<TaskListener> listeners = new ArrayList<TaskListener>(); + private final String taskName; + private final List<TaskListener> listeners = new ArrayList<TaskListener>(); private String subtaskName; public Task(String taskName_, String subtaskName_, int max_) diff --git a/wizards/com/sun/star/wizards/ui/event/TaskEvent.java b/wizards/com/sun/star/wizards/ui/event/TaskEvent.java index 1c98cffdfae3..40f6f5d49e78 100644 --- a/wizards/com/sun/star/wizards/ui/event/TaskEvent.java +++ b/wizards/com/sun/star/wizards/ui/event/TaskEvent.java @@ -27,7 +27,7 @@ public class TaskEvent extends EventObject public static final int TASK_STATUS_CHANGED = 3; public static final int SUBTASK_NAME_CHANGED = 4; public static final int TASK_FAILED = 5; - private int type; + private final int type; public TaskEvent(Task source, int type_) { diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java index 122bffd94d07..8d0eb79b38ca 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java @@ -38,16 +38,16 @@ import org.openoffice.xmerge.util.registry.ConverterInfo; public class Convert implements Cloneable { /** ConvertInfo that corresponds to the from-mime/to-mime conversion. */ - private ConverterInfo ci; + private final ConverterInfo ci; /** * {@code true} if converting to the Office format, {@code false} if * converting to the device format. */ - private boolean toOffice; + private final boolean toOffice; /** Holds the convert input data. */ - private ConvertData inputCD = new ConvertData(); + private final ConvertData inputCD = new ConvertData(); /** * Construct a Convert class with specified {@code ConvertInfo} registry diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java index b355298a3b15..8641417b1cf7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java @@ -33,7 +33,7 @@ public class ConvertData { /** * Vector of {@code Document} objects. */ - private ArrayList<Object> v = new ArrayList<Object>(); + private final ArrayList<Object> v = new ArrayList<Object>(); /** * Name of the {@code ConvertData} object. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java index c00a21b50523..cb2e07a4a788 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java @@ -69,7 +69,7 @@ public abstract class PluginFactory { /** * Cached {@code ConvertInfo} object. */ - private ConverterInfo ciCache; + private final ConverterInfo ciCache; /** * Constructor that caches the {@code ConvertInfo} that corresponds to the diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java index f3f68045afe4..0d166aac4004 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java @@ -44,10 +44,10 @@ import java.util.Date; public final class PdbEncoder { /** PDB header. */ - private PdbHeader header = null; + private final PdbHeader header; /** the PalmDB object. */ - private PalmDB db = null; + private final PalmDB db; /** The pattern for unique_id=0x00BABE(start). */ private final static int START_UNIQUE_ID = 0x00BABE; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java index 3bfaf3cb8404..fdbbbffd319f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java @@ -49,7 +49,7 @@ class OfficeZip { private final static int BUFFERSIZE = 1024; - private List<Entry> entryList = null; + private final List<Entry> entryList; private int contentIndex = -1; private int styleIndex = -1; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java index 3faeb876fd14..2163fc658b96 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java @@ -156,7 +156,7 @@ public class ParaStyle extends Style implements Cloneable { /** Array of attribute values for this paragraph {@code Style}. */ private int value[] = new int[NR_PROPERTIES]; /** Array of attribute names for this paragraph {@code Style}. */ - private String attrName[] = { + private final String attrName[] = { "fo:margin-left", "fo:margin-right", "fo:margin-top", @@ -167,7 +167,7 @@ public class ParaStyle extends Style implements Cloneable { }; /** Array of attribute structures for this paragraph {@code Style}. */ - private Class<?> algor[] = { + private final Class<?> algor[] = { horizSize.class, horizSize.class, horizSize.class, diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java index 5c34c0ef9c36..f08d664d9a3d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java @@ -39,7 +39,7 @@ import org.w3c.dom.NodeList; */ public class StyleCatalog { - private ArrayList<Style> styles; // The actual styles + private final ArrayList<Style> styles; // The actual styles /** * Constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java index 04eebc081663..33cab9fd8f87 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java @@ -48,8 +48,8 @@ import org.openoffice.xmerge.util.Debug; */ public class DocumentMergerImpl implements DocumentMerger { - private ConverterCapabilities cc_; - private org.openoffice.xmerge.Document orig = null; + private final ConverterCapabilities cc_; + private final org.openoffice.xmerge.Document orig; /** * Constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java index 0675e5805102..9d6ddbc6ee1a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java @@ -59,7 +59,7 @@ public abstract class SxcDocumentDeserializer implements OfficeConstants, private org.w3c.dom.Document doc = null; /** A {@code ConvertData} object assigned to this object. */ - private ConvertData cd = null; + private final ConvertData cd ; /** A {@code StyleCatalog} for the workbook. */ private StyleCatalog styleCat = null; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java index b29e89fd44f2..ed7012d76cf2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java @@ -54,8 +54,8 @@ public final class DocumentDeserializerImpl implements DocumentDeserializer,URIResolver { /** A {@code ConvertData} object assigned to this object. */ - private ConvertData cd = null; - private PluginFactoryImpl pluginFactory = null; + private final ConvertData cd; + private final PluginFactoryImpl pluginFactory; /** * Constructor that assigns the given {@code ConvertData} to this object. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java index da0d308d463b..a4bcd770ddb0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java @@ -39,8 +39,8 @@ import org.openoffice.xmerge.util.Debug; */ public class DocumentMergerImpl implements DocumentMerger { - private ConverterCapabilities cc_; - private org.openoffice.xmerge.Document orig = null; + private final ConverterCapabilities cc_; + private final org.openoffice.xmerge.Document orig; public DocumentMergerImpl(org.openoffice.xmerge.Document doc, ConverterCapabilities cc) { cc_ = cc; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java index 6c238db82fa1..988909c51f79 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java @@ -61,9 +61,9 @@ public final class DocumentSerializerImpl implements DocumentSerializer,OfficeConstants,URIResolver { /** SXW {@code Document} object that this converter processes. */ - private GenericOfficeDocument sxwDoc = null; + private final GenericOfficeDocument sxwDoc; - private PluginFactoryImpl pluginFactory = null; + private final PluginFactoryImpl pluginFactory; /** * Constructor. @@ -72,7 +72,7 @@ public final class DocumentSerializerImpl * @param doc A SXW {@code Document} to be converted. */ public DocumentSerializerImpl(PluginFactoryImpl pf,Document doc) { - pluginFactory=pf; + pluginFactory=pf; sxwDoc = (GenericOfficeDocument) doc; } diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java index b24c2c78379d..b797f3a865f6 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java @@ -39,7 +39,7 @@ public final class Difference { public static final int UNCHANGE = 4; /** The action of the diff - either {@link #ADD} or {@link #DELETE} */ - private int operation; + private final int operation; /** * The position of the content that should be operated on (original @@ -99,14 +99,14 @@ public final class Difference { * <diff orgPos=4 modPos=2 operation=DELETE> <-- element E * <diff orgPos=5 modPos=2 operation=DELETE> <-- element F}</pre></blockquote> */ - private int orgPosition; + private final int orgPosition; /** * The position of the content that should be operated (modified iterator). * * <p>For explanation and examples, see {@link #orgPosition}</p>. */ - private int modPosition; + private final int modPosition; /** * Constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java index 8b634ae821c1..9603d0ed9853 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java @@ -42,9 +42,9 @@ import java.util.List; */ public class CharacterParser { - private TextNodeIterator textNodes; + private final TextNodeIterator textNodes; private int currentPosition = 0; - private List<TextNodeEntry> nodeList_ = null; + private final List<TextNodeEntry> nodeList_; private char[] charArray; /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java index ed34c337f1ac..6a3768065722 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java @@ -45,8 +45,8 @@ public abstract class NodeIterator implements Iterator { private List<Node> nodeList = null; private int currentPosition = 0; - private Node root; - private ConverterCapabilities cc_ = null; + private final Node root; + private final ConverterCapabilities cc_; /** * Standard constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java index ebe234fdadf7..cbfb9e93fc8d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java @@ -29,9 +29,9 @@ import org.w3c.dom.Node; */ public class TextNodeEntry { - private int startChar_; - private int endChar_; - private Node node_; + private final int startChar_; + private final int endChar_; + private final Node node_; /** * Constructor diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index 1d37e4cabd5f..2c208dba0528 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -39,7 +39,7 @@ import org.openoffice.xmerge.util.XmlUtil; */ public class DocumentMerge implements MergeAlgorithm { - private NodeMergeAlgorithm subDocumentMerge = null; + private final NodeMergeAlgorithm subDocumentMerge; /** The capabilities of this converter. */ protected ConverterCapabilities cc_; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java index 491f1ac13ac4..afc03935e8d7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java @@ -39,7 +39,7 @@ import org.openoffice.xmerge.util.XmlUtil; public final class PositionBaseRowMerge implements NodeMergeAlgorithm { /** The capabilities of this converter. */ - private ConverterCapabilities cc_; + private final ConverterCapabilities cc_; /** * Constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java index 2f87d2b8e1de..f83b43b6668b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java @@ -51,10 +51,10 @@ public final class Driver { private String mergeFile = null; /** Command-line parmeter. */ - private ArrayList<String> deviceFiles = new ArrayList<String>(); + private final ArrayList<String> deviceFiles = new ArrayList<String>(); /** Command-line parmeter shortcuts. */ - private String mimeTypes[] = { + private final String mimeTypes[] = { "sxc", "staroffice/sxc", "sxw","staroffice/sxw" }; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java index eb2388a9440d..414655770848 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java @@ -26,7 +26,7 @@ import java.util.ArrayList; public class IntArrayList { /** The list to hold our integers. */ - private ArrayList<Integer> list; + private final ArrayList<Integer> list; /** * Constructor. diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java index ddcdb148579d..aa7dd7c10de4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java @@ -36,7 +36,7 @@ import java.util.ResourceBundle; */ public final class Resources { - private ResourceBundle rb = null; + private final ResourceBundle rb; private static Resources instance = null; /** diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java index 14e036687828..192777bd50b1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java @@ -41,20 +41,20 @@ public class ConverterInfo { "staroffice/sxc" }; - private String piJarName; - private String piOfficeMime; - private ArrayList<String> piDeviceMime; - private String piDisplayName; - private String piDescription; - private String piVersion; - private String piVendor; - private String piClassImpl; + private final String piJarName; + private final String piOfficeMime; + private final ArrayList<String> piDeviceMime; + private final String piDisplayName; + private final String piDescription; + private final String piVersion; + private final String piVendor; + private final String piClassImpl; private String piXsltSerial; private String piXsltDeserial; private boolean piCanSerialize = false; private boolean piCanDeserialize = false; private boolean piCanMerge = false; - private ClassLoader piClassLoader = null; + private final ClassLoader piClassLoader; private PluginFactory piPluginFactory; diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java index 411b5b005560..476f047c0d8d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java @@ -45,9 +45,9 @@ public class ConverterInfoReader { private final static String ATTRIB_DEVICE_TYPE = "type"; private final static String TAG_XSLT_DESERIAL = "converter-xslt-deserialize"; private final static String TAG_XSLT_SERIAL = "converter-xslt-serialize"; - private String jarfilename; - private Document document; - private ArrayList<ConverterInfo> converterInfoList; + private final String jarfilename; + private final Document document; + private final ArrayList<ConverterInfo> converterInfoList; /** * Constructor. |