From 0063cf285696951e336b9cec1da8881997b286ce Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Nov 2014 10:01:21 +0200 Subject: java: make fields final where possible found by PMD Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec --- sc/qa/complex/dataPilot/CheckDataPilot.java | 2 +- sc/qa/complex/dataPilot/_XDataPilotDescriptor.java | 8 ++++---- sc/qa/complex/dataPilot/_XDataPilotTable.java | 4 ++-- sc/qa/complex/dataPilot/_XNamed.java | 2 +- sc/qa/complex/dataPilot/_XPropertySet.java | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sc/qa/complex') 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 : -- cgit