summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-18 10:01:21 +0200
committerNoel Grandin <noel@peralex.com>2014-11-18 12:44:28 +0200
commit0063cf285696951e336b9cec1da8881997b286ce (patch)
treebe70dfd8127c35f9e4a6d18d4db459a587813bf4 /forms
parent250391009aec9930abcc57930ddd4b6f56f4df9c (diff)
java: make fields final where possible
found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
Diffstat (limited to 'forms')
-rw-r--r--forms/qa/integration/forms/BooleanValidator.java9
-rw-r--r--forms/qa/integration/forms/DocumentHelper.java2
-rw-r--r--forms/qa/integration/forms/DocumentViewHelper.java6
-rw-r--r--forms/qa/integration/forms/FormComponent.java10
-rw-r--r--forms/qa/integration/forms/FormLayer.java2
-rw-r--r--forms/qa/integration/forms/ImageComparison.java4
-rw-r--r--forms/qa/integration/forms/SingleControlValidation.java6
-rw-r--r--forms/qa/integration/forms/TableCellTextBinding.java4
-rw-r--r--forms/qa/integration/forms/WaitForInput.java2
-rw-r--r--forms/qa/org/openoffice/xforms/Instance.java4
-rw-r--r--forms/qa/org/openoffice/xforms/Model.java6
11 files changed, 24 insertions, 31 deletions
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 )
{