diff options
author | Noel Grandin <noel@peralex.com> | 2014-11-18 10:01:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-11-18 12:44:28 +0200 |
commit | 0063cf285696951e336b9cec1da8881997b286ce (patch) | |
tree | be70dfd8127c35f9e4a6d18d4db459a587813bf4 /qadevOOo/runner/graphical | |
parent | 250391009aec9930abcc57930ddd4b6f56f4df9c (diff) |
java: make fields final where possible
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
Diffstat (limited to 'qadevOOo/runner/graphical')
-rw-r--r-- | qadevOOo/runner/graphical/DirectoryHelper.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/ImageHelper.java | 6 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/IniFile.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/JPEGComparator.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/MSOfficePostscriptCreator.java | 11 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/Office.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/OpenOfficeDatabaseReportExtractor.java | 2 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/OpenOfficePostscriptCreator.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/ParameterHelper.java | 4 | ||||
-rw-r--r-- | qadevOOo/runner/graphical/Tolerance.java | 2 |
10 files changed, 17 insertions, 24 deletions
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; |