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/util/XMLTools.java | |
parent | 250391009aec9930abcc57930ddd4b6f56f4df9c (diff) |
java: make fields final where possible
found by PMD
Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
Diffstat (limited to 'qadevOOo/runner/util/XMLTools.java')
-rw-r--r-- | qadevOOo/runner/util/XMLTools.java | 20 |
1 files changed, 10 insertions, 10 deletions
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) ; |