changeset 193:7fceceace84b

7902320: Declaring variables with a weaker type
author dbessono
date Fri, 14 Sep 2018 14:21:11 +0100
parents 88da62e220e0
children 4e81a6dee721
files src/com/sun/interview/FileListQuestion.java src/com/sun/interview/Interview.java src/com/sun/interview/wizard/selectiontree/SelectionTree.java src/com/sun/javatest/Harness.java src/com/sun/javatest/InterviewPropagator.java src/com/sun/javatest/TRT_Iterator.java src/com/sun/javatest/TRT_TreeNode.java src/com/sun/javatest/TestResultTable.java src/com/sun/javatest/agent/AgentMonitorBatchCommandManager.java src/com/sun/javatest/batch/ObserverCommand.java src/com/sun/javatest/exec/BP_BranchSubpanel.java src/com/sun/javatest/exec/BasicSessionControl.java src/com/sun/javatest/exec/ET_FilterHandler.java src/com/sun/javatest/exec/EmptyTestTreeModel.java src/com/sun/javatest/exec/LogViewer.java src/com/sun/javatest/exec/NewReportDialog.java src/com/sun/javatest/exec/ReportHandler.java src/com/sun/javatest/exec/RunTestsHandler.java src/com/sun/javatest/exec/TT_NodeCache.java src/com/sun/javatest/exec/TestTreeModel.java src/com/sun/javatest/exec/TestTreePanel.java src/com/sun/javatest/exec/ToolBarPanel.java src/com/sun/javatest/interview/TestsInterview.java src/com/sun/javatest/junit/JUnitBareMultiTest.java src/com/sun/javatest/junit/JUnitSuperTestFinder.java src/com/sun/javatest/logging/FilteredLogModel.java src/com/sun/javatest/logging/LogModel.java src/com/sun/javatest/logging/ObservedFile.java src/com/sun/javatest/report/CustomReportFormat.java src/com/sun/javatest/services/ServiceManager.java src/com/sun/javatest/tool/ConfigManager.java src/com/sun/javatest/tool/HelpMenu.java src/com/sun/javatest/tool/LogManager.java
diffstat 33 files changed, 84 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/interview/FileListQuestion.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/interview/FileListQuestion.java	Fri Sep 14 14:21:11 2018 +0100
@@ -28,6 +28,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -342,7 +343,7 @@
 
         char sep = s.indexOf('\n') == -1 ? ' ' : '\n';
 
-        ArrayList<File> v = new ArrayList<>();
+        List<File> v = new ArrayList<>();
         int start = -1;
         for (int i = 0; i < s.length(); i++) {
             if (s.charAt(i) == sep) {
--- a/src/com/sun/interview/Interview.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/interview/Interview.java	Fri Sep 14 14:21:11 2018 +0100
@@ -999,7 +999,7 @@
      * @see #iteratePathToCurrent
      */
     public Iterator<Question> iteratePath(boolean flattenNestedInterviews) {
-        Vector<Question> v = new Vector<>();
+        List<Question> v = new Vector<>();
         iteratePath0(v, flattenNestedInterviews, true, true);
         return v.iterator();
     }
@@ -1016,7 +1016,7 @@
      * @see #iteratePath
      */
     public Iterator<Question> iteratePathToCurrent(boolean flattenNestedInterviews) {
-        Vector<Question> v = new Vector<>();
+        List<Question> v = new Vector<>();
         iteratePath0(v, flattenNestedInterviews, false, true);
         return v.iterator();
     }
@@ -1749,7 +1749,7 @@
             export0(data, hiddenPath, true);
     }
 
-    private void export0(Map<String, String> data, ArrayList<Question> paths, boolean processHidden) {
+    private void export0(Map<String, String> data, Iterable<Question> paths, boolean processHidden) {
         for (Question path : paths) {
             try {
                 if (path instanceof InterviewQuestion) {
--- a/src/com/sun/interview/wizard/selectiontree/SelectionTree.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/interview/wizard/selectiontree/SelectionTree.java	Fri Sep 14 14:21:11 2018 +0100
@@ -618,7 +618,7 @@
     }
 
     @SuppressWarnings("unchecked")
-    private void expandHierarchyMap(List<SelectionTreeNode> curLevelNodes, Map<SelectionElement, Object> expanded) {
+    private void expandHierarchyMap(Iterable<SelectionTreeNode> curLevelNodes, Map<SelectionElement, Object> expanded) {
         for (Map.Entry<SelectionElement, Object> entry : expanded.entrySet()) {
             SelectionElement nodeObject = entry.getKey();
             SelectionTreeNode nodeToExpand = null;
--- a/src/com/sun/javatest/Harness.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/Harness.java	Fri Sep 14 14:21:11 2018 +0100
@@ -845,7 +845,7 @@
         return result;
     }
 
-    private static String formatFilterList(final ArrayList<String> names) {
+    private static String formatFilterList(final List<String> names) {
         if (names == null || names.size() == 0)
             return "";
 
--- a/src/com/sun/javatest/InterviewPropagator.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/InterviewPropagator.java	Fri Sep 14 14:21:11 2018 +0100
@@ -560,7 +560,7 @@
         }
 
         void makeUpdatesReport(PrintStream sw) {
-            LinkedHashMap<String, String[]> allUpdate = new LinkedHashMap<>(updateMap);
+            Map<String, String[]> allUpdate = new LinkedHashMap<>(updateMap);
             allUpdate.putAll(partialUpdateMap);
             makeReport(sw, allUpdate, true);
         }
--- a/src/com/sun/javatest/TRT_Iterator.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/TRT_Iterator.java	Fri Sep 14 14:21:11 2018 +0100
@@ -127,7 +127,7 @@
         this.filters = filters;
 
         if (trs != null && trs.length != 0) {
-            ArrayList<String> names = new ArrayList<>();
+            List<String> names = new ArrayList<>();
 
             // prime the outqueue with the given tests
             for (TestResult tr : trs) {
@@ -892,7 +892,7 @@
         return out;
     }
 
-    private static String generateFilteredStatus(ArrayList<TestFilter> fs) {
+    private static String generateFilteredStatus(List<TestFilter> fs) {
         StringBuilder sb = new StringBuilder();
 
         if (fs == null || fs.size() == 0) {
--- a/src/com/sun/javatest/TRT_TreeNode.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/TRT_TreeNode.java	Fri Sep 14 14:21:11 2018 +0100
@@ -769,8 +769,8 @@
             // need to update lastScanDate before the loop to avoid
             // excessive recursion
             lastScanDate = thisScanDate;
-            ArrayList<TreeNode> nodesUsed = new ArrayList<>();
-            ArrayList<TestResult> usedTests = new ArrayList<>();
+            List<TreeNode> nodesUsed = new ArrayList<>();
+            List<TestResult> usedTests = new ArrayList<>();
 
             for (File file : files) {
                 if (table.isBranchFile(file)) {
--- a/src/com/sun/javatest/TestResultTable.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/TestResultTable.java	Fri Sep 14 14:21:11 2018 +0100
@@ -624,7 +624,7 @@
         if (target == null)
             return null;
 
-        ArrayList<TreeNode> path = new ArrayList<>();
+        List<TreeNode> path = new ArrayList<>();
         TreeNode loc = target.getParent();
         while (loc != null) {
             path.add(0, loc);
@@ -660,7 +660,7 @@
         if (target == null)
             return null;
 
-        ArrayList<TreeNode> path = new ArrayList<>();
+        List<TreeNode> path = new ArrayList<>();
         TreeNode loc = target;
         while (loc != null) {
             path.add(0, loc);
--- a/src/com/sun/javatest/agent/AgentMonitorBatchCommandManager.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/agent/AgentMonitorBatchCommandManager.java	Fri Sep 14 14:21:11 2018 +0100
@@ -27,6 +27,7 @@
 package com.sun.javatest.agent;
 
 import java.io.IOException;
+import java.util.Iterator;
 import java.util.ListIterator;
 
 import com.sun.javatest.tool.Command;
@@ -90,7 +91,7 @@
             return "agentPoolPort";
         }
 
-        AgentPoolPortCommand(ListIterator<String> argIter) throws Fault {
+        AgentPoolPortCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -121,7 +122,7 @@
             return "agentPoolTimeout";
         }
 
-        AgentPoolTimeoutCommand(ListIterator<String> argIter) throws Fault {
+        AgentPoolTimeoutCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
--- a/src/com/sun/javatest/batch/ObserverCommand.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/batch/ObserverCommand.java	Fri Sep 14 14:21:11 2018 +0100
@@ -33,6 +33,8 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.Iterator;
+import java.util.List;
 import java.util.ListIterator;
 import java.util.Vector;
 
@@ -53,7 +55,7 @@
         return new HelpTree.Node(i18n, "cmgr.help.observer", opts);
     }
 
-    ObserverCommand(ListIterator<String> argIter) throws Fault {
+    ObserverCommand(Iterator<String> argIter) throws Fault {
         super(getName());
 
         Vector<String> v = null;
@@ -162,7 +164,7 @@
         return classLoader == null ? Class.forName(name) : classLoader.loadClass(name);
     }
 
-    private void addClassPathEntry(String s, Vector<URL> v) throws Fault {
+    private void addClassPathEntry(String s, List<URL> v) throws Fault {
         try {
             if (s.length() > 0)
                 v.add(new File(s).toURL());
--- a/src/com/sun/javatest/exec/BP_BranchSubpanel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/BP_BranchSubpanel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -34,6 +34,7 @@
 import com.sun.javatest.tool.UIFactory;
 import com.sun.javatest.util.I18NResourceBundle;
 import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Base class for the individual displays of the BranchPanel.
@@ -109,7 +110,7 @@
         }
 
         TT_BasicNode spot = root;
-        ArrayList<TT_TreeNode> list = new ArrayList<>(path.length + 1);
+        List<TT_TreeNode> list = new ArrayList<>(path.length + 1);
         list.add(root);
         for (int i = 1; i < path.length; i++) {
             try {
--- a/src/com/sun/javatest/exec/BasicSessionControl.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/BasicSessionControl.java	Fri Sep 14 14:21:11 2018 +0100
@@ -229,7 +229,7 @@
                 InterviewParameters ip = (InterviewParameters)p;
                 InterviewParameters clone = ip.getWorkDirectory().getTestSuite().createInterview();
                 clone.setWorkDirectory(ip.getWorkDirectory());
-                HashMap<String, String> data = new HashMap<>();
+                Map<String, String> data = new HashMap<>();
                 ip.save(data);
                 clone.load(data, false);
                 return clone;
--- a/src/com/sun/javatest/exec/ET_FilterHandler.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/ET_FilterHandler.java	Fri Sep 14 14:21:11 2018 +0100
@@ -269,7 +269,7 @@
 
         ConstrainedPreferenceMap cpm = new ConstrainedPreferenceMap(prefs);
         // using meta_ prefix for info not written by the filter itself
-        PrefixMap<String> pm = new PrefixMap<>(cpm, FILTER_PREFIX + prefIndex);
+        Map<String, String> pm = new PrefixMap<>(cpm, FILTER_PREFIX + prefIndex);
 
         // it's really a special case to have a pref. entry which does not
         // have a tsId associated
--- a/src/com/sun/javatest/exec/EmptyTestTreeModel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/EmptyTestTreeModel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -35,6 +35,7 @@
 import javax.swing.event.TreeModelListener;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 /**
  * Empty tree model for showing fake test tree used
@@ -45,8 +46,8 @@
     private FilterSelectionHandler filterHandler;
     private UIFactory uif;
     private Parameters params;
-    private ArrayList<TreeModelListener> treeModelListeners = new ArrayList<>();
-    private ArrayList<TestResultTable.TreeNodeObserver> rootObservers = new ArrayList<>();
+    private List<TreeModelListener> treeModelListeners = new ArrayList<>();
+    private List<TestResultTable.TreeNodeObserver> rootObservers = new ArrayList<>();
     private TT_NodeCache oldInfo;
     private TreeNode oldNode;
 
--- a/src/com/sun/javatest/exec/LogViewer.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/LogViewer.java	Fri Sep 14 14:21:11 2018 +0100
@@ -46,8 +46,10 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.EventObject;
+import java.util.List;
 import java.util.Random;
 import java.util.HashSet;
+import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.AbstractAction;
@@ -1126,7 +1128,7 @@
             children.add(ch);
         }
 
-        private ArrayList<JCheckBox> children = new ArrayList<>();
+        private List<JCheckBox> children = new ArrayList<>();
     }
 
 
@@ -1389,7 +1391,7 @@
     private static final String AUTOSCROLL_PREF = "logviewer.autoScroll";
     private static final String WORDWRAP_PREF = "logviewer.wordWrap";
     private int windowCounter = 0;
-    private static HashSet<Integer> windowList = new HashSet<>();
+    private static Set<Integer> windowList = new HashSet<>();
     private String working1;
     private String working2;
 
--- a/src/com/sun/javatest/exec/NewReportDialog.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/NewReportDialog.java	Fri Sep 14 14:21:11 2018 +0100
@@ -62,6 +62,7 @@
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 
 import javax.swing.AbstractAction;
@@ -848,7 +849,7 @@
         }
         else {
             String[] names = Report.getHtmlReportFilenames();
-            ArrayList<File> possible = new ArrayList<>();
+            List<File> possible = new ArrayList<>();
 
             for (String name : names) {
                 File rpt = new File(reportDir, name);
@@ -1613,9 +1614,9 @@
     private JCheckBox cbBak;
     private JTextField numBak;
 
-    private ArrayList<JCheckBox> htmlGroup = new ArrayList<>();
-    private ArrayList<JCheckBox> configGroup = new ArrayList<>();
-    private ArrayList<JCheckBox> kflGroup = new ArrayList<>();
+    private List<JCheckBox> htmlGroup = new ArrayList<>();
+    private List<JCheckBox> configGroup = new ArrayList<>();
+    private List<JCheckBox> kflGroup = new ArrayList<>();
 
     private File reportDir;
     private JButton browseBtn;
--- a/src/com/sun/javatest/exec/ReportHandler.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/ReportHandler.java	Fri Sep 14 14:21:11 2018 +0100
@@ -220,7 +220,7 @@
     @Override
     public void save(Map<String, String> parentMap) {
         if (lastState != null && lastState.size() > 0)  {
-           PrefixMap<String> pm = new PrefixMap<>(parentMap, REPORT_PREFIX);
+           Map<String, String> pm = new PrefixMap<>(parentMap, REPORT_PREFIX);
            pm.putAll(lastState);
         }
     }
--- a/src/com/sun/javatest/exec/RunTestsHandler.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/RunTestsHandler.java	Fri Sep 14 14:21:11 2018 +0100
@@ -582,7 +582,7 @@
     // to remember paths passed via executeImmediate(paths).
     private String[] whatToRun;
 
-    private final ArrayList<Observer> observers = new ArrayList<>();
+    private final List<Observer> observers = new ArrayList<>();
 
 
     @Override
--- a/src/com/sun/javatest/exec/TT_NodeCache.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/TT_NodeCache.java	Fri Sep 14 14:21:11 2018 +0100
@@ -27,6 +27,7 @@
 package com.sun.javatest.exec;
 
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Vector;
 
 import com.sun.javatest.Status;
@@ -724,7 +725,7 @@
     /**
      * Determine the index of a particular test in a vector.
      */
-    private int searchList(TestResult target, Vector<?> list) {
+    private int searchList(TestResult target, List<?> list) {
         return list.indexOf(target);
     }
 
--- a/src/com/sun/javatest/exec/TestTreeModel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/TestTreeModel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -32,6 +32,7 @@
 import java.util.Hashtable;
 import java.util.HashSet;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Set;
 
 import javax.swing.tree.TreeModel;
@@ -514,7 +515,7 @@
         if (path == null || path.length() == 0 || root == null) {
             return null;
         }
-        ArrayList<TT_TreeNode> al = new ArrayList<>();
+        List<TT_TreeNode> al = new ArrayList<>();
         al.add(root);
         TT_BasicNode spot = root;
 
@@ -665,7 +666,7 @@
     }
 
     TreePath[] urlsToPaths(String... urls) {
-        ArrayList<TreePath> result = new ArrayList<>();
+        List<TreePath> result = new ArrayList<>();
 
         for (String url : urls) {
             TreePath thisOne = urlToPath(url);
--- a/src/com/sun/javatest/exec/TestTreePanel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/TestTreePanel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -295,7 +295,7 @@
 
     private TreePath[] getTreePaths(String... paths) {
         if (paths != null) {
-            ArrayList<TreePath> translatedPaths = new ArrayList<>(paths.length);
+            List<TreePath> translatedPaths = new ArrayList<>(paths.length);
 
             for (String path : paths) {
                 // the paths need to be reconditioned because the JTree will not
--- a/src/com/sun/javatest/exec/ToolBarPanel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/exec/ToolBarPanel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -33,6 +33,7 @@
 import java.awt.FlowLayout;
 import java.awt.Insets;
 import java.util.ArrayList;
+import java.util.List;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
 import javax.swing.border.BevelBorder;
@@ -88,7 +89,7 @@
             synchronized (target.getTreeLock()) {
                 int realW = target.getSize().width;
                 int commponentsPerRow = 0;
-                ArrayList<Integer> hs = new ArrayList<>();
+                List<Integer> hs = new ArrayList<>();
                 if (realW == 0) {
                     return super.preferredLayoutSize(target);
                 }
--- a/src/com/sun/javatest/interview/TestsInterview.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/interview/TestsInterview.java	Fri Sep 14 14:21:11 2018 +0100
@@ -484,7 +484,7 @@
             return;
         }
         else {
-            ArrayList<String> v = new ArrayList<>();
+            List<String> v = new ArrayList<>();
             StringBuilder sb = new StringBuilder();
             for (String test : tests) {
                 // ignore duplicates, and look for otherwise bad tests
--- a/src/com/sun/javatest/junit/JUnitBareMultiTest.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/junit/JUnitBareMultiTest.java	Fri Sep 14 14:21:11 2018 +0100
@@ -33,6 +33,7 @@
 import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.List;
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
@@ -161,5 +162,5 @@
     protected SortedMap <String, Method> tests;
 
     protected String testCases[] = null;
-    protected Vector<String> excludeTestCases = new Vector<>();
+    protected List<String> excludeTestCases = new Vector<>();
 }
--- a/src/com/sun/javatest/junit/JUnitSuperTestFinder.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/junit/JUnitSuperTestFinder.java	Fri Sep 14 14:21:11 2018 +0100
@@ -32,6 +32,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassVisitor;
@@ -336,7 +337,7 @@
 
 //----------member variables------------------------------------------------
 
-    protected ArrayList<String> requiredSuperclass = new ArrayList<>();
+    protected List<String> requiredSuperclass = new ArrayList<>();
     protected String initialTag = "test";
     protected final MethodFinderVisitor mfv = new MethodFinderVisitor();
     protected static final I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(JUnitSuperTestFinder.class);
--- a/src/com/sun/javatest/logging/FilteredLogModel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/logging/FilteredLogModel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -28,6 +28,7 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.logging.Level;
 
 
@@ -175,8 +176,8 @@
     private FilterWorker worker;
     private ArrayList<LiteLogRecord> shownRecords;
     private LogFilter filter;
-    private ArrayList<NewPageListener> pageListeners = new ArrayList<>();
-    private ArrayList<FilterChangedListener> filterListeners = new ArrayList<>();
+    private List<NewPageListener> pageListeners = new ArrayList<>();
+    private List<FilterChangedListener> filterListeners = new ArrayList<>();
 
     @Override
     public boolean isStableState() {
--- a/src/com/sun/javatest/logging/LogModel.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/logging/LogModel.java	Fri Sep 14 14:21:11 2018 +0100
@@ -34,6 +34,7 @@
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -439,8 +440,8 @@
     private ArrayList<String> loggers;
     private ArrayList<LiteLogRecord> records;
 
-    private ArrayList<LoggerListener> loggerListeners = new ArrayList<>();
-    private ArrayList<NewPageListener> pageListeners = new ArrayList<>();
+    private List<LoggerListener> loggerListeners = new ArrayList<>();
+    private List<NewPageListener> pageListeners = new ArrayList<>();
     private MessageCache messageCache = new MessageCache();
     private String file;
     private RandomAccessFile mirrorFile;
--- a/src/com/sun/javatest/logging/ObservedFile.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/logging/ObservedFile.java	Fri Sep 14 14:21:11 2018 +0100
@@ -134,7 +134,7 @@
         }
     }
 
-    synchronized void readLoggers(ArrayList<String> loggers) {
+    synchronized void readLoggers(List<String> loggers) {
         String line = "";
         try {
             RandomAccessFile logs = new RandomAccessFile(getLoggersInexFile(), "r");
@@ -148,7 +148,7 @@
         }
     }
 
-    synchronized void readRecords(ArrayList<LogModel.LiteLogRecord> records) {
+    synchronized void readRecords(List<LogModel.LiteLogRecord> records) {
         try {
             RandomAccessFile recs = new RandomAccessFile(getRecordInexFile(), "r");
             while (recs.getFilePointer() < recs.length()) {
--- a/src/com/sun/javatest/report/CustomReportFormat.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/report/CustomReportFormat.java	Fri Sep 14 14:21:11 2018 +0100
@@ -133,7 +133,7 @@
 
 
     private CustomReport theCustomReport;
-    private ArrayList<ReportFormat> subreports = new ArrayList<>();
+    private List<ReportFormat> subreports = new ArrayList<>();
     private static final List<CustomReport> NO_REPORTS = Collections.emptyList();
 
 
--- a/src/com/sun/javatest/services/ServiceManager.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/services/ServiceManager.java	Fri Sep 14 14:21:11 2018 +0100
@@ -381,7 +381,7 @@
                 (tr = iter.next()) != null ) {
             try {
                 td = tr.getDescription();
-                HashSet<TestPath> toRemove = new HashSet<>();
+                Set<TestPath> toRemove = new HashSet<>();
                 for (TestPath p : copy) {
                     if (p.matches(td)) {
                         for (String sId : p.getServices()) {
--- a/src/com/sun/javatest/tool/ConfigManager.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/tool/ConfigManager.java	Fri Sep 14 14:21:11 2018 +0100
@@ -37,6 +37,7 @@
 import java.text.NumberFormat;
 import java.text.ParsePosition;
 import java.util.Iterator;
+import java.util.List;
 import java.util.ListIterator;
 import java.util.Locale;
 import java.util.Map;
@@ -221,7 +222,7 @@
             return "concurrency";
         }
 
-        ConcurrencyCommand(ListIterator<String> argIter) throws Fault {
+        ConcurrencyCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -270,7 +271,7 @@
             return "config";
         }
 
-        ConfigCommand(ListIterator<String> argIter) throws Fault {
+        ConfigCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -336,7 +337,7 @@
             return "writeConfig";
         }
 
-        WriteConfigCommand(ListIterator<String> argIter) throws Fault {
+        WriteConfigCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -382,7 +383,7 @@
             return "env";
         }
 
-        EnvCommand(ListIterator<String> argIter) throws Fault {
+        EnvCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -417,7 +418,7 @@
         EnvFilesCommand(ListIterator<String> argIter) throws Fault {
             super(getNames()[0]);
 
-            Vector<File> v = new Vector<>();
+            List<File> v = new Vector<>();
 
             while (argIter.hasNext()) {
                 String arg = nextArg(argIter);
@@ -463,7 +464,7 @@
             super(getName());
 
             // in time, we should support -none, -default, -latest etc
-            Vector<File> v = new Vector<>();
+            List<File> v = new Vector<>();
 
             while (argIter.hasNext()) {
                 String arg = nextArg(argIter);
@@ -509,7 +510,7 @@
             super(getName());
 
             // in time, we should support -none, -default, -latest etc
-            Vector<File> v = new Vector<>();
+            List<File> v = new Vector<>();
 
             while (argIter.hasNext()) {
                 String arg = nextArg(argIter);
@@ -557,7 +558,7 @@
             cmdForFile = getCommandForFile(file);
         }
 
-        OpenCommand(ListIterator<String> argIter) throws Fault {
+        OpenCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -613,7 +614,7 @@
             return "keywords";
         }
 
-        KeywordsCommand(ListIterator<String> argIter) throws Fault {
+        KeywordsCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             // could support -all -any
@@ -744,7 +745,7 @@
             return new HelpTree.Node(i18n, "cnfg.params", opts);
         }
 
-        ParamsCommand(ListIterator<String> argIter) throws Fault {
+        ParamsCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             Vector<String> v = new Vector<>();
@@ -779,7 +780,7 @@
             return "priorStatus";
         }
 
-        PriorStatusCommand(ListIterator<String> argIter) throws Fault {
+        PriorStatusCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -860,7 +861,7 @@
             return "set";
         }
 
-        SetCommand(ListIterator<String> argIter) throws Fault {
+        SetCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -1001,7 +1002,7 @@
             return "setX";
         }
 
-        SetXCommand(ListIterator<String> argIter) throws Fault {
+        SetXCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -1075,7 +1076,7 @@
         TestsCommand(ListIterator<String> argIter) throws Fault {
             super(getName());
 
-            Vector<String> v = new Vector<>();
+            List<String> v = new Vector<>();
 
             while (argIter.hasNext()) {
                 // could possibly support @file or similar syntax here for a list of tests
@@ -1119,7 +1120,7 @@
             return new String[] { "testsuite", "ts" };
         }
 
-        TestSuiteCommand(ListIterator<String> argIter) throws Fault {
+        TestSuiteCommand(Iterator<String> argIter) throws Fault {
             super(getNames()[0]);
 
             while (argIter.hasNext()) {
@@ -1344,7 +1345,7 @@
             return "timeoutfactor";
         }
 
-        TimeoutFactorCommand(ListIterator<String> argIter) throws Fault {
+        TimeoutFactorCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())
@@ -1392,7 +1393,7 @@
             return new String[] { "workdirectory", "workdir", "wd" };
         }
 
-        WorkDirectoryCommand(ListIterator<String> argIter) throws Fault {
+        WorkDirectoryCommand(Iterator<String> argIter) throws Fault {
             super(getNames()[0]);
 
             while (argIter.hasNext()) {
--- a/src/com/sun/javatest/tool/HelpMenu.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/tool/HelpMenu.java	Fri Sep 14 14:21:11 2018 +0100
@@ -201,7 +201,7 @@
         v.add(s.substring(start));
 
         //JTextField[] tfs = new JTextField[v.size()];
-        ArrayList<JComponent> tfs = new ArrayList<>();
+        List<JComponent> tfs = new ArrayList<>();
         for (String aV : v) {
             JTextField tf = new JTextField(aV);
             tf.setBorder(null);
@@ -282,7 +282,7 @@
             return null;
         }
 
-        ArrayList<JMenuItem> v = new ArrayList<>();
+        List<JMenuItem> v = new ArrayList<>();
         for (int i = 0; i < docs.length; i++) {
             final HelpSet doc = docs[i];
 
--- a/src/com/sun/javatest/tool/LogManager.java	Thu Sep 13 15:52:06 2018 +0100
+++ b/src/com/sun/javatest/tool/LogManager.java	Fri Sep 14 14:21:11 2018 +0100
@@ -28,6 +28,7 @@
 
 import java.io.*;
 import java.nio.charset.StandardCharsets;
+import java.util.Iterator;
 import java.util.ListIterator;
 
 import com.sun.javatest.util.HelpTree;
@@ -81,7 +82,7 @@
             return "log";
         }
 
-        LogCommand(ListIterator<String> argIter) throws Fault {
+        LogCommand(Iterator<String> argIter) throws Fault {
             super(getName());
 
             if (!argIter.hasNext())