diff -r 95270d3460e8 src/com/sun/javatest/agent/ActiveAgentPool.java --- a/src/com/sun/javatest/agent/ActiveAgentPool.java +++ b/src/com/sun/javatest/agent/ActiveAgentPool.java @@ -354,7 +354,7 @@ synchronized Entry next() { Entry e = null; if (v.size() > 0) { - e = (Entry)(v.elementAt(0)); + e = v.elementAt(0); v.removeElementAt(0); notifyRemovedFromPool(e); } @@ -395,7 +395,7 @@ } } - private Vector v = new Vector(); + private Vector v = new Vector<>(); private Observer[] observers = new Observer[0]; } diff -r 95270d3460e8 src/com/sun/javatest/agent/Agent.java --- a/src/com/sun/javatest/agent/Agent.java +++ b/src/com/sun/javatest/agent/Agent.java @@ -203,8 +203,8 @@ else { traceOut.println("set map:"); map.setTracing(tracing, traceOut); - for (Enumeration e = map.enumerate(); e.hasMoreElements(); ) { - String[] entry = (String[])(e.nextElement()); + for (Enumeration e = map.enumerate(); e.hasMoreElements(); ) { + String[] entry = e.nextElement(); traceOut.println("map-from: " + entry[0]); traceOut.println("map-to: " + entry[1]); } @@ -335,7 +335,7 @@ // interrupt any threads that are running for (int i = 0; i < threads.size(); i++) { - Thread t = (Thread)(threads.elementAt(i)); + Thread t = threads.elementAt(i); if (tracing) traceOut.println("INTERRUPTING THREAD " + t.getName()); t.interrupt(); @@ -347,7 +347,7 @@ // close any tasks that are running for (int i = 0; i < tasks.size(); i++) { - Task t = (Task)(tasks.elementAt(i)); + Task t = tasks.elementAt(i); if (tracing) { Connection c = t.connection; // maybe null; if it is, task is already closing traceOut.println("CLOSING TASK " + (c == null ? "[unknown]" : c.getName())); @@ -542,8 +542,8 @@ private boolean closing; private Thread mainThread; private int maxThreads; - private Vector threads = new Vector(); - private Vector tasks = new Vector(); + private Vector threads = new Vector<>(); + private Vector tasks = new Vector<>(); private Notifier notifier = new Notifier(); private Object currSystemStreamOwner = null; private PrintStream saveOut; @@ -936,7 +936,7 @@ } - private Status executeMain(Class c, String[] args, + private Status executeMain(Class c, String[] args, PrintWriter testLog, PrintWriter testRef) throws IOException, ClassNotFoundException, IllegalAccessException { notifier.execMain(connection, tag, c.getName(), args); @@ -1107,7 +1107,7 @@ private ClassLoader getAgentClassLoader(boolean useSharedClassLoader) throws InstantiationException, IllegalAccessException { - Class classLoaderClass; + Class classLoaderClass; try { String s = getClass().getName(); String pkg = s.substring(0, s.lastIndexOf('.')); diff -r 95270d3460e8 src/com/sun/javatest/agent/AgentMain.java --- a/src/com/sun/javatest/agent/AgentMain.java +++ b/src/com/sun/javatest/agent/AgentMain.java @@ -374,7 +374,7 @@ switch (mode) { case ACTIVE: try { - Class c = Class.forName(pkg + ".ActiveConnectionFactory"); + Class c = Class.forName(pkg + ".ActiveConnectionFactory"); Constructor m = c.getConstructor(new Class[] {String.class, int.class}); Object[] args = { activeHost, new Integer(activePort) }; return (ConnectionFactory)(m.newInstance(args)); @@ -391,7 +391,7 @@ case PASSIVE: try { - Class c = Class.forName(pkg + ".PassiveConnectionFactory"); + Class c = Class.forName(pkg + ".PassiveConnectionFactory"); Constructor m = c.getConstructor(new Class[] {int.class, int.class}); Object[] args = { new Integer(passivePort), new Integer(concurrency + 1) }; return (ConnectionFactory)(m.newInstance(args)); @@ -412,7 +412,7 @@ case SERIAL: try { - Class c = Class.forName(pkg + ".SerialPortConnectionFactory"); + Class c = Class.forName(pkg + ".SerialPortConnectionFactory"); Constructor m = c.getConstructor(new Class[] {String.class, String.class, int.class}); Object[] args = {serialPort, Agent.productName, new Integer(10*1000)}; return (ConnectionFactory)(m.newInstance(args)); diff -r 95270d3460e8 src/com/sun/javatest/agent/AgentManager.java --- a/src/com/sun/javatest/agent/AgentManager.java +++ b/src/com/sun/javatest/agent/AgentManager.java @@ -538,7 +538,7 @@ // might be better not to flush these ... for (Enumeration e = zips.keys(); e.hasMoreElements(); ) { File f = (File)(e.nextElement()); - ZipFile z = (ZipFile)(zips.get(f)); + ZipFile z = zips.get(f); zips.remove(f); z.close(); } @@ -604,7 +604,7 @@ private byte[] readFromJar(String name, File jarFile) { //System.err.println("readFromJar: " + name + " " + jarFile); try { - ZipFile z = (ZipFile)zips.get(jarFile); + ZipFile z = zips.get(jarFile); if (z == null) { z = new ZipFile(jarFile); zips.put(jarFile, z); @@ -641,7 +641,7 @@ private File[] split(String s) { char pathCh = File.pathSeparatorChar; - Vector v = new Vector(); + Vector v = new Vector<>(); int start = 0; for (int i = s.indexOf(pathCh); i != -1; i = s.indexOf(pathCh, start)) { add(s.substring(start, i), v); @@ -654,7 +654,7 @@ return path; } - private void add(String s, Vector v) { + private void add(String s, Vector v) { if (s.length() != 0) v.addElement(new File(s)); } @@ -666,7 +666,7 @@ private File[] classPath; private boolean sharedCl; private int timeout = 0; - private Hashtable zips = new Hashtable(); + private Hashtable zips = new Hashtable<>(); } } diff -r 95270d3460e8 src/com/sun/javatest/agent/AgentMonitorTool.java --- a/src/com/sun/javatest/agent/AgentMonitorTool.java +++ b/src/com/sun/javatest/agent/AgentMonitorTool.java @@ -178,7 +178,7 @@ add(timeoutField, fc); timeoutLabel.setLabelFor(timeoutField); - listData = new DefaultListModel(); + listData = new DefaultListModel<>(); list = uif.createList("tool.pool", listData); list.setPrototypeCellValue("abcdefghiklmnopqrstuvwxyz"); list.setVisibleRowCount(3); @@ -339,8 +339,8 @@ private JTextField portField; private JLabel timeoutLabel; private JTextField timeoutField; - private JList list; - private DefaultListModel listData; + private JList list; + private DefaultListModel listData; } private class CurrentAgentsSubpanel extends JPanel @@ -352,13 +352,13 @@ setLayout(new GridBagLayout()); uif.setToolTip(this, "tool.curr"); - listData = new DefaultListModel(); + listData = new DefaultListModel<>(); list = uif.createList("tool.list.curr", listData); list.setVisibleRowCount(5); list.setCellRenderer(new DefaultListCellRenderer() { public Component getListCellRendererComponent(JList list, Object o, int index, boolean isSelected, boolean cellHasFocus) { - String name = ((Entry)o).toString(); + String name = o.toString(); return super.getListCellRendererComponent(list, name, index, isSelected, cellHasFocus); } }); @@ -421,7 +421,7 @@ } public synchronized void valueChanged(ListSelectionEvent ev) { - Entry e = (Entry)(list.getSelectedValue()); + Entry e = list.getSelectedValue(); if (e == null) { addressField.setText(""); tagField.setText(""); @@ -470,7 +470,7 @@ } else { for (int i = 0; i < listData.size(); i++) { - Entry e = (Entry)(listData.elementAt(i)); + Entry e = listData.elementAt(i); if (e.connection == c) { listData.removeElement(e); break; @@ -504,8 +504,8 @@ boolean localizeArgs; } - private JList list; - private DefaultListModel listData; + private JList list; + private DefaultListModel listData; private Entry selectedEntry; private JLabel addressLabel; private JTextField addressField; diff -r 95270d3460e8 src/com/sun/javatest/agent/AgentPanel.java --- a/src/com/sun/javatest/agent/AgentPanel.java +++ b/src/com/sun/javatest/agent/AgentPanel.java @@ -690,7 +690,7 @@ public synchronized void addTask(TaskState task) { if (tasks.size() >= maxTasks) { for (int i = 0; i < tasks.size(); i++) { - String s = (String) getItem(i); + String s = getItem(i); // skip over active tasks that will be updated later if (s.startsWith("CONN") || s.startsWith("EXEC")) continue; @@ -706,7 +706,7 @@ public synchronized TaskState getTask(Connection c) { for (int i = 0; i < tasks.size(); i++) { - TaskState ts = (TaskState)(tasks.elementAt(i)); + TaskState ts = tasks.elementAt(i); if (ts.connection == c) return ts; } @@ -714,7 +714,7 @@ } public synchronized TaskState getSelectedTask() { - return (TaskState)(tasks.elementAt(super.getSelectedIndex())); + return tasks.elementAt(super.getSelectedIndex()); } public synchronized void removeAll() { @@ -758,7 +758,7 @@ } private int maxTasks = 10; - private Vector tasks = new Vector(); + private Vector tasks = new Vector<>(); } @@ -973,7 +973,7 @@ } - private Vector tasks = new Vector(); + private Vector tasks = new Vector<>(); private int[] statusCounts = new int[Status.NUM_STATES]; private int exceptionsCount; diff -r 95270d3460e8 src/com/sun/javatest/agent/Folder.java --- a/src/com/sun/javatest/agent/Folder.java +++ b/src/com/sun/javatest/agent/Folder.java @@ -143,7 +143,7 @@ public void showTab(String name, boolean visible) { for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.name.equals(name)) { if (e.visibleTab != visible) { e.visibleTab = visible; @@ -157,7 +157,7 @@ public String getNextVisibleTab() { int currentIndex = Math.max(0, getCurrentIndex()); for (int i = currentIndex + 1; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.visibleTab) return e.name; } @@ -167,7 +167,7 @@ public String getPrevVisibleTab() { int currentIndex = getCurrentIndex(); for (int i = currentIndex - 1; i >= 0; i--) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.visibleTab) return e.name; } @@ -176,7 +176,7 @@ public Component current() { for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.comp.isVisible()) return e.comp; } @@ -185,7 +185,7 @@ public void show(Component comp) { for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.comp == comp) { show(e); return; @@ -195,7 +195,7 @@ public void show(String name) { for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.name.equals(name)) { show(e); return; @@ -215,7 +215,7 @@ int tabHeight = fm.getHeight() + tabpad; Entry selected = null; for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.comp.isVisible()) { selected = e; break; @@ -234,7 +234,7 @@ int x = border + hgap; int baseLine = tabHeight + vgap; for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); int tabH = (e.visibleTab || e.comp.isVisible() ? tabHeight : tabHeight / 3); int w = fm.stringWidth(e.name); Polygon tab = new Polygon(); @@ -282,7 +282,7 @@ FontMetrics fm = getFontMetrics(getFont()); int w = border + 2 * hgap + tabSpace; for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); w += slant + (fm == null ? 0 : fm.stringWidth(e.name)) + slant + tabSpace; } return w; @@ -309,7 +309,7 @@ private int getCurrentIndex() { for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); if (e.comp.isVisible()) return i; } @@ -318,7 +318,7 @@ private Entry getCurrentEntry() { int i = getCurrentIndex(); - return (i == -1 ? null : (Entry)(entries.elementAt(i)) ); + return (i == -1 ? null : entries.elementAt(i)); } void mousePressed(int mouseX, int mouseY) { @@ -326,7 +326,7 @@ if (vgap < mouseY && mouseY < border + fm.getHeight() + vgap) { int x = border + hgap; for (int i = 0; i < entries.size(); i++) { - Entry e = (Entry)entries.elementAt(i); + Entry e = entries.elementAt(i); int w = fm.stringWidth(e.name); x += slant + w + slant + tabSpace; if (mouseX < x) { @@ -339,7 +339,7 @@ private ItemListener itemListener; - private Vector entries = new Vector(); + private Vector entries = new Vector<>(); private int border; private int slant; private int tabSpace; diff -r 95270d3460e8 src/com/sun/javatest/agent/Map.java --- a/src/com/sun/javatest/agent/Map.java +++ b/src/com/sun/javatest/agent/Map.java @@ -61,7 +61,7 @@ */ public static Map readFile(String name) throws IOException { try { - Class c = Class.forName("java.io.FileReader"); // optional API in Jersonal Java + Class c = Class.forName("java.io.FileReader"); // optional API in Jersonal Java Constructor m = c.getConstructor(new Class[] {String.class}); Reader r = (Reader)(m.newInstance(new Object[] {name})); return new Map(r); @@ -133,8 +133,8 @@ (r instanceof BufferedReader ? (BufferedReader)r : new BufferedReader(r)) ; // data arrives in rows, but we want it in columns - Vector from = new Vector(); - Vector to = new Vector(); + Vector from = new Vector<>(); + Vector to = new Vector<>(); String line; while ((line = in.readLine()) != null) { line = line.trim(); @@ -203,8 +203,8 @@ * Enumerate the entries of the map. * @return an enumeration of the translation entries within the map */ - public Enumeration enumerate() { - Vector v = new Vector(fromValues.length); + public Enumeration enumerate() { + Vector v = new Vector<>(fromValues.length); for (int i = 0; i < fromValues.length; i++) { v.addElement(new String[] {fromValues[i], toValues[i]}); } diff -r 95270d3460e8 src/com/sun/javatest/agent/SocketConnection.java --- a/src/com/sun/javatest/agent/SocketConnection.java +++ b/src/com/sun/javatest/agent/SocketConnection.java @@ -184,7 +184,7 @@ } private static String getHostName(InetAddress addr) { - String s = (String) (addressCache.get(addr)); + String s = addressCache.get(addr); if (s == null) { s = addr.getHostName(); addressCache.put(addr, s); @@ -238,5 +238,5 @@ private boolean closed; private Thread waitThread; private static Timer timer = new Timer(); - private static Hashtable addressCache = new Hashtable(); + private static Hashtable addressCache = new Hashtable<>(); } diff -r 95270d3460e8 src/com/sun/javatest/audit/Audit.java --- a/src/com/sun/javatest/audit/Audit.java +++ b/src/com/sun/javatest/audit/Audit.java @@ -106,10 +106,10 @@ */ public Audit(TestFinderQueue tfq, ExcludeList excludeList, WorkDirectory workDir) { - Vector badChecksumTestsV = new Vector(); - Vector badTestDescriptionsV = new Vector(); - Vector badTestCaseTestsV = new Vector(); - Vector badTestsV = new Vector(); + Vector badChecksumTestsV = new Vector<>(); + Vector badTestDescriptionsV = new Vector<>(); + Vector badTestCaseTestsV = new Vector<>(); + Vector badTestsV = new Vector<>(); workDir.getTestResultTable().waitUntilReady(); @@ -136,9 +136,9 @@ Map.Entry e = (Map.Entry) (i.next()); String key = (String) (e.getKey()); String value = (String) (e.getValue()); - Vector allValuesForKey = (Vector)(envTable.get(key)); + Vector allValuesForKey = envTable.get(key); if (allValuesForKey == null) { - allValuesForKey = new Vector(); + allValuesForKey = new Vector<>(); envTable.put(key, allValuesForKey); } if (!allValuesForKey.contains(value)) @@ -169,7 +169,7 @@ for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) { String key = (String)(e.nextElement()); - Vector allValuesForKey = (Vector)(envTable.get(key)); + Vector allValuesForKey = envTable.get(key); envCounts[allValuesForKey.size() == 1 ? 0 : 1]++; } @@ -492,7 +492,7 @@ out.println(); out.print(i18n.getString("adt.envList.title")); - SortedSet ss = new TreeSet(); + SortedSet ss = new TreeSet<>(); for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) { String key = (String)(e.nextElement()); ss.add(key); @@ -500,7 +500,7 @@ for (Iterator iter = ss.iterator(); iter.hasNext(); ) { String key = (String) (iter.next()); - Vector allValuesForKey = (Vector)(envTable.get(key)); + Vector allValuesForKey = envTable.get(key); if (allValuesForKey.size() == 1) { if (showAll) out.println(i18n.getString("adt.envKeyValue", @@ -692,7 +692,7 @@ // Create an array of possible date formats to parse dates in .jtr files. // Most likely is Unix C time in English; the array will be reordered in use // by moving the recently used entries to the front of the array. - Vector v = new Vector(); + Vector v = new Vector<>(); // generic Java default // 10-Sep-99 3:25:11 PM @@ -733,7 +733,7 @@ private Date latestStart; private DateFormat[] dateFormats; - private Hashtable envTable = new Hashtable(); + private Hashtable> envTable = new Hashtable<>(); private PrintStream out; private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(Audit.class); } diff -r 95270d3460e8 src/com/sun/javatest/audit/ListPane.java --- a/src/com/sun/javatest/audit/ListPane.java +++ b/src/com/sun/javatest/audit/ListPane.java @@ -61,7 +61,7 @@ } } - private class ListModel extends AbstractListModel { + private class ListModel extends AbstractListModel { public Object getElementAt(int index) { return data[index]; } @@ -95,6 +95,6 @@ } } - protected JList list; + protected JList list; private ListModel model; } diff -r 95270d3460e8 src/com/sun/javatest/audit/OptionsDialog.java --- a/src/com/sun/javatest/audit/OptionsDialog.java +++ b/src/com/sun/javatest/audit/OptionsDialog.java @@ -192,7 +192,7 @@ private void updateTestSuiteChoices() { // get the paths of currently loaded test suites // could move this to TestSuite, and use the dirMap cache - SortedSet s = new TreeSet(); + SortedSet s = new TreeSet<>(); Desktop d = tool.getDesktop(); Tool[] tools = d.getTools(); if (tools != null) { @@ -237,7 +237,7 @@ // get the paths of currently loaded work directories // could move this to WorkDirectory and use the dirMap cache - SortedSet s = new TreeSet(); + SortedSet s = new TreeSet<>(); Desktop d = tool.getDesktop(); Tool[] tools = d.getTools(); if (tools != null) { @@ -291,7 +291,7 @@ } private void updateConfigFileChoices() { - SortedSet s = new TreeSet(); + SortedSet s = new TreeSet<>(); String wdp = (String) (wdField.getSelectedItem()); try { WorkDirectory wd = WorkDirectory.open(new File(wdp)); @@ -306,10 +306,10 @@ setItems(cfField, s); } - private void setItems(JComboBox field, SortedSet s) { + private void setItems(JComboBox field, SortedSet s) { // first, remove unwanted entries from field for (int i = field.getItemCount() - 1; i >= 0; i-- ) { - String item = (String) (field.getItemAt(i)); + String item = field.getItemAt(i); if (s.contains(item)) { // this item is required, so remove it from the // set to be added later @@ -321,7 +321,7 @@ } // those items remaining in s need to be added to the field - for (Iterator iter = s.iterator(); iter.hasNext(); ) + for (Iterator iter = s.iterator(); iter.hasNext(); ) field.addItem(iter.next()); } @@ -329,15 +329,15 @@ private ActionListener okListener; private JPanel body; - private JComboBox tsField; + private JComboBox tsField; private JButton tsBtn; private TestSuiteChooser testSuiteChooser; - private JComboBox wdField; + private JComboBox wdField; private JButton wdBtn; private WorkDirChooser workDirChooser; - private JComboBox cfField; + private JComboBox cfField; private JButton cfBtn; private JFileChooser configFileChooser; diff -r 95270d3460e8 src/com/sun/javatest/batch/ObserverCommand.java --- a/src/com/sun/javatest/batch/ObserverCommand.java +++ b/src/com/sun/javatest/batch/ObserverCommand.java @@ -56,7 +56,7 @@ ObserverCommand(ListIterator argIter) throws Fault { super(getName()); - Vector v = null; + Vector v = null; while (argIter.hasNext()) { String arg = nextArg(argIter); @@ -73,7 +73,7 @@ break; else { if (v == null) - v = new Vector(); + v = new Vector<>(); v.add(arg); } } @@ -130,7 +130,7 @@ } } - private Harness.Observer tryConstructor(Class obsClass, Class[] argTypes, Object[] args) + private Harness.Observer tryConstructor(Class obsClass, Class[] argTypes, Object[] args) throws IllegalAccessException, InstantiationException, InvocationTargetException { try { @@ -144,7 +144,7 @@ private void setClassPath(String s) throws Fault { char pathCh = File.pathSeparatorChar; - Vector v = new Vector(); + Vector v = new Vector<>(); int start = 0; for (int i = s.indexOf(pathCh); i != -1; i = s.indexOf(pathCh, start)) { addClassPathEntry(s.substring(start, i), v); @@ -164,7 +164,7 @@ return (classLoader == null ? Class.forName(name) : classLoader.loadClass(name)); } - private void addClassPathEntry(String s, Vector v) throws Fault { + private void addClassPathEntry(String s, Vector v) throws Fault { try { if (s.length() > 0) v.add(new File(s).toURL()); diff -r 95270d3460e8 src/com/sun/javatest/cof/COFApplication.java --- a/src/com/sun/javatest/cof/COFApplication.java +++ b/src/com/sun/javatest/cof/COFApplication.java @@ -29,12 +29,12 @@ import java.util.LinkedHashMap; public class COFApplication extends COFItem { - static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlElements; static String xmlTagName; static { xmlTagName = "application"; - xmlAttributes = new LinkedHashMap(); + xmlAttributes = new LinkedHashMap<>(); xmlAttributes.put("id", "id"); xmlAttributes.put("environmentid", "environmentid"); xmlAttributes.put("swentityid", "swentityid"); @@ -56,11 +56,11 @@ return id; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFApplications.java --- a/src/com/sun/javatest/cof/COFApplications.java +++ b/src/com/sun/javatest/cof/COFApplications.java @@ -33,35 +33,35 @@ public class COFApplications extends COFItem { -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("application", "application"); xmlTagName = "applications"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List application; + protected List application; - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } String getItemTagName() { return xmlTagName; } - public List getApplication() { + public List getApplication() { if (application == null) { - application = new ArrayList(); + application = new ArrayList<>(); } return this.application; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFData.java --- a/src/com/sun/javatest/cof/COFData.java +++ b/src/com/sun/javatest/cof/COFData.java @@ -86,11 +86,11 @@ data.put(name, value); } - public void putAll(Map map) { + public void putAll(Map map) { data.putAll(map); } - private Map data = new HashMap(); + private Map data = new HashMap<>(); private CustomFilter filter = new CustomFilterAdapter(); diff -r 95270d3460e8 src/com/sun/javatest/cof/COFEnvironment.java --- a/src/com/sun/javatest/cof/COFEnvironment.java +++ b/src/com/sun/javatest/cof/COFEnvironment.java @@ -47,20 +47,20 @@ "user-locale", "encoding", "timezone", "bits", "displaydepth", "description", "sw" }; - static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; private static I18NResourceBundle i18n = I18NResourceBundle .getBundleForClass(Main.class); static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); for (int i = 0; i < propOrder.length; i++) { xmlElements.put(propOrder[i], propTags[i]); } - xmlAttributes = new LinkedHashMap(); + xmlAttributes = new LinkedHashMap<>(); xmlAttributes.put("id", "id"); xmlTagName = "environment"; } @@ -94,7 +94,7 @@ protected COFOS os; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/sw; + protected List sw; // @XmlElement(name = "system-locale", namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema") protected String systemLocale; @@ -257,11 +257,11 @@ return id; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -331,9 +331,9 @@ * * */ - public List/**/getSw() { + public List getSw() { if (sw == null) { - sw = new ArrayList/**/(); + sw = new ArrayList<>(); } return this.sw; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFEnvironments.java --- a/src/com/sun/javatest/cof/COFEnvironments.java +++ b/src/com/sun/javatest/cof/COFEnvironments.java @@ -55,20 +55,20 @@ */ public class COFEnvironments extends COFItem { -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("environment", "environment"); xmlTagName = "environments"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ environment; + protected List environment; /** * Gets the value of the environment property. @@ -92,18 +92,18 @@ * * */ - public List/**/ getEnvironment() { + public List getEnvironment() { if (environment == null) { - environment = new ArrayList/**/(); + environment = new ArrayList<>(); } return this.environment; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFItem.java --- a/src/com/sun/javatest/cof/COFItem.java +++ b/src/com/sun/javatest/cof/COFItem.java @@ -53,10 +53,10 @@ private String[] getAttributeProperties() { return itemAttributes == null? null: (String []) itemAttributes.keySet().toArray(new String[itemAttributes.size()]); } - LinkedHashMap getItemAttributes(){ + LinkedHashMap getItemAttributes(){ return null; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return null; }; diff -r 95270d3460e8 src/com/sun/javatest/cof/COFOS.java --- a/src/com/sun/javatest/cof/COFOS.java +++ b/src/com/sun/javatest/cof/COFOS.java @@ -68,14 +68,14 @@ "version", "arch" }; -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); for (int i = 0;i getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFReportAnnotation.java --- a/src/com/sun/javatest/cof/COFReportAnnotation.java +++ b/src/com/sun/javatest/cof/COFReportAnnotation.java @@ -69,29 +69,28 @@ })*/ public class COFReportAnnotation extends COFItem{ -static LinkedHashMap xmlAttributes; -static LinkedHashMap xmlElements; +static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("name", "name"); xmlElements.put("value","value"); xmlTagName = "annotation"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) -// protected List/**/ name; - protected List/**/ name; + protected List name; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ value; + protected List value; - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -121,9 +120,9 @@ * * */ - public List/**/ getName() { + public List getName() { if (name == null) { - name = new ArrayList/**/(); + name = new ArrayList<>(); } return this.name; } @@ -150,9 +149,9 @@ * * */ - public List/**/ getValue() { + public List getValue() { if (value == null) { - value = new ArrayList/**/(); + value = new ArrayList<>(); } return this.value; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFReportAnnotations.java --- a/src/com/sun/javatest/cof/COFReportAnnotations.java +++ b/src/com/sun/javatest/cof/COFReportAnnotations.java @@ -54,19 +54,19 @@ })*/ public class COFReportAnnotations extends COFItem{ -static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; +static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("annotation","annotation"); xmlTagName = "annotations"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ annotation; + protected List annotation; /** * Gets the value of the annotation property. @@ -90,18 +90,18 @@ * * */ - public List/**/ getAnnotation() { + public List getAnnotation() { if (annotation == null) { - annotation = new ArrayList/**/(); + annotation = new ArrayList<>(); } return this.annotation; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFSWEntities.java --- a/src/com/sun/javatest/cof/COFSWEntities.java +++ b/src/com/sun/javatest/cof/COFSWEntities.java @@ -54,26 +54,26 @@ })*/ public class COFSWEntities extends COFItem { -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("swentity", "swentity"); xmlTagName = "swentities"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ swentity; + protected List swentity; - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } String getItemTagName() { @@ -102,9 +102,9 @@ * * */ - public List/**/ getSwentity() { + public List getSwentity() { if (swentity == null) { - swentity = new ArrayList/**/(); + swentity = new ArrayList<>(); } return this.swentity; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFSWEntity.java --- a/src/com/sun/javatest/cof/COFSWEntity.java +++ b/src/com/sun/javatest/cof/COFSWEntity.java @@ -86,17 +86,17 @@ })*/ public class COFSWEntity extends COFItem{ -static LinkedHashMap xmlAttributes; -static LinkedHashMap xmlElements; +static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlElements; static String xmlTagName; static { xmlTagName = "swentity"; - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("name","name"); xmlElements.put("type","type"); xmlElements.put("version","version"); xmlElements.put("description","description"); - xmlAttributes = new LinkedHashMap(); + xmlAttributes = new LinkedHashMap<>(); xmlAttributes.put("id","id"); } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema") @@ -138,11 +138,11 @@ return id; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFStatus.java --- a/src/com/sun/javatest/cof/COFStatus.java +++ b/src/com/sun/javatest/cof/COFStatus.java @@ -81,13 +81,13 @@ })*/ public class COFStatus extends COFItem{ -static LinkedHashMap xmlAttributes; -static LinkedHashMap xmlElements; +static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); - xmlAttributes = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); + xmlAttributes = new LinkedHashMap<>(); xmlElements.put("expected","expected"); xmlElements.put("actual","actual"); xmlAttributes.put("value","value"); @@ -126,11 +126,11 @@ public String getExpected() { return expected; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTest.java --- a/src/com/sun/javatest/cof/COFTest.java +++ b/src/com/sun/javatest/cof/COFTest.java @@ -116,13 +116,13 @@ static boolean noTestCases = false; protected final static Pattern testCasePattern = Pattern //.compile("^(\\S+): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)"); .compile("^(.*): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)"); - static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); - xmlAttributes = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); + xmlAttributes = new LinkedHashMap<>(); xmlElements.put("name", "name"); xmlElements.put("appuse", "appuse"); xmlElements.put("status", "status"); @@ -147,7 +147,7 @@ // @XmlAttribute protected String analysis; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ appuse; + protected List appuse; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema") protected COFTestAttributes attributes; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema") @@ -263,8 +263,8 @@ return; } - List /**/ jtrCases = testcases.getTestcase(); - List /**/ mtlTestCases = mtl.getTestCases(tr.getTestName()); + List jtrCases = testcases.getTestcase(); + List mtlTestCases = mtl.getTestCases(tr.getTestName()); if (mtlTestCases != null && mtlTestCases.size() > 0) { // for (COFTestCase jtrCase : jtrCases) { Iterator it = jtrCases.iterator(); @@ -283,7 +283,7 @@ String strS = cofStatus[tr.getStatus().getType()]; nStatus.setValue(strS); //System.out.println("+ " + tr.getTestName() + " " + tcName + " " + strS ); - testcases.getTestcase().add(testCaseName); + testcases.getTestcase().add(nTc); } } } @@ -327,9 +327,9 @@ * * */ - public List/**/ getAppuse() { + public List getAppuse() { if (appuse == null) { - appuse = new ArrayList/**/(); + appuse = new ArrayList<>(); } return this.appuse; } @@ -394,11 +394,11 @@ return id; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -466,7 +466,7 @@ // this.id = value; // } private static void initDateFormats() { - Vector v = new Vector(); + Vector v = new Vector<>(); // generic Java default // 10-Sep-99 3:25:11 PM diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestAttribute.java --- a/src/com/sun/javatest/cof/COFTestAttribute.java +++ b/src/com/sun/javatest/cof/COFTestAttribute.java @@ -85,34 +85,34 @@ })*/ public class COFTestAttribute extends COFItem{ -static LinkedHashMap xmlAttributes; -static LinkedHashMap xmlElements; +static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("name","name"); xmlElements.put("value","value"); xmlTagName = "attribute"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ name; + protected List name; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ value; + protected List value; public COFTestAttribute(String name, String value) { this.getName().add(name); this.getValue().add(value); } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -142,9 +142,9 @@ * * */ - public List/**/ getName() { + public List getName() { if (name == null) { - name = new ArrayList/**/(); + name = new ArrayList<>(); } return this.name; } @@ -171,9 +171,9 @@ * * */ - public List/**/ getValue() { + public List getValue() { if (value == null) { - value = new ArrayList/**/(); + value = new ArrayList<>(); } return this.value; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestAttributes.java --- a/src/com/sun/javatest/cof/COFTestAttributes.java +++ b/src/com/sun/javatest/cof/COFTestAttributes.java @@ -60,19 +60,19 @@ })*/ public class COFTestAttributes extends COFItem{ -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { xmlTagName = "attributes"; - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("attribute","attribute"); } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ attribute; + protected List attribute; /** * Gets the value of the attribute property. @@ -96,18 +96,18 @@ * * */ - public List/**/ getAttribute() { + public List getAttribute() { if (attribute == null) { - attribute = new ArrayList/**/(); + attribute = new ArrayList<>(); } return this.attribute; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } String getItemTagName() { diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestCase.java --- a/src/com/sun/javatest/cof/COFTestCase.java +++ b/src/com/sun/javatest/cof/COFTestCase.java @@ -90,22 +90,22 @@ public class COFTestCase extends COFItem { static long count = 0; - static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { xmlTagName = "testcase"; - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("name", "name"); xmlElements.put("status", "status"); xmlElements.put("starttime", "starttime"); xmlElements.put("endtime", "endtime"); xmlElements.put("attributes", "attributes"); xmlElements.put("description", "description"); - xmlAttributes = new LinkedHashMap(); + xmlAttributes = new LinkedHashMap<>(); xmlAttributes.put("id", "id"); // xmlAttributes.put("analysis", "analysis"); } @@ -202,11 +202,11 @@ return name + ":" + idNum; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestCases.java --- a/src/com/sun/javatest/cof/COFTestCases.java +++ b/src/com/sun/javatest/cof/COFTestCases.java @@ -63,26 +63,26 @@ })*/ public class COFTestCases extends COFItem{ - static LinkedHashMap xmlAttributes; + static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { xmlTagName = "testcases"; - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("testcase", "testcase"); } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ testcase; + protected List testcase; - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -113,9 +113,9 @@ * * */ - public List/**/ getTestcase() { + public List getTestcase() { if (testcase == null) { - testcase = new ArrayList/**/(); + testcase = new ArrayList<>(); } return this.testcase; } diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestSuite.java --- a/src/com/sun/javatest/cof/COFTestSuite.java +++ b/src/com/sun/javatest/cof/COFTestSuite.java @@ -150,7 +150,7 @@ if (!legacyMode) { trt.waitUntilReady(); } - HashMap map = new HashMap(); + HashMap map = new HashMap<>(); String id = cofData.get("environment.id", "env:0").split(":")[0] + ":"; int id_n = 0; for (Iterator iter = trt.getIterator(); iter.hasNext();) { diff -r 95270d3460e8 src/com/sun/javatest/cof/COFTestSuites.java --- a/src/com/sun/javatest/cof/COFTestSuites.java +++ b/src/com/sun/javatest/cof/COFTestSuites.java @@ -59,26 +59,26 @@ })*/ public class COFTestSuites extends COFItem{ -static LinkedHashMap xmlAttributes; +static LinkedHashMap xmlAttributes; - static LinkedHashMap xmlElements; + static LinkedHashMap xmlElements; static String xmlTagName; static { - xmlElements = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); xmlElements.put("testsuite", "testsuite"); xmlTagName = "testsuites"; } // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) - protected List/**/ testsuite; + protected List testsuite; - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; } @@ -108,9 +108,9 @@ * * */ - public List/**/ getTestsuite() { + public List getTestsuite() { if (testsuite == null) { - testsuite = new ArrayList/**/(); + testsuite = new ArrayList<>(); } return this.testsuite; } diff -r 95270d3460e8 src/com/sun/javatest/cof/ID.java --- a/src/com/sun/javatest/cof/ID.java +++ b/src/com/sun/javatest/cof/ID.java @@ -33,13 +33,13 @@ { static class Factory { ID create(String base) { - Integer last = (Integer) (map.get(base)); + Integer last = map.get(base); int index = (last == null ? 0 : last.intValue() + 1); map.put(base, new Integer(index)); return new ID(base, index); } - Map map = new HashMap(); + Map map = new HashMap<>(); }; private ID(String base, int index) { diff -r 95270d3460e8 src/com/sun/javatest/cof/MTL.java --- a/src/com/sun/javatest/cof/MTL.java +++ b/src/com/sun/javatest/cof/MTL.java @@ -47,14 +47,14 @@ private void init() { if (table == null) { - table = new HashMap>(); + table = new HashMap<>(); BufferedReader r = null; try { r = new BufferedReader(new InputStreamReader(new FileInputStream(mtl), StandardCharsets.UTF_8)); String line; while ((line = r.readLine()) != null) { StringTokenizer st = new StringTokenizer(line); - ArrayList cases = new ArrayList(); + ArrayList cases = new ArrayList<>(); String testName = null; if (st.hasMoreTokens()) { testName = st.nextToken(); diff -r 95270d3460e8 src/com/sun/javatest/cof/Main.java --- a/src/com/sun/javatest/cof/Main.java +++ b/src/com/sun/javatest/cof/Main.java @@ -459,7 +459,7 @@ File dir = null; File tsPath = null; - Vector data = new Vector(); + Vector data = new Vector<>(); InterviewParameters ip = null; private boolean xsdFlag = false; diff -r 95270d3460e8 src/com/sun/javatest/cof/Report.java --- a/src/com/sun/javatest/cof/Report.java +++ b/src/com/sun/javatest/cof/Report.java @@ -38,17 +38,17 @@ static final String VERSION = "2.0.2"; - static final LinkedHashMap xmlAttributes; + static final LinkedHashMap xmlAttributes; - static final LinkedHashMap xmlElements; + static final LinkedHashMap xmlElements; static String xmlTagName; private static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"; static { - xmlElements = new LinkedHashMap(); - xmlAttributes = new LinkedHashMap(); + xmlElements = new LinkedHashMap<>(); + xmlAttributes = new LinkedHashMap<>(); xmlElements.put("date", "date"); xmlElements.put("version", "version"); xmlElements.put("environments", "environments"); @@ -73,7 +73,7 @@ protected COFReportAnnotations annotations; // @XmlAnyElement - protected List/**/any; + protected Listany; // @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true) protected COFApplications applications; @@ -177,9 +177,9 @@ * * */ - public List/**/getAny() { + public ListgetAny() { if (any == null) { - any = new ArrayList/**/(); + any = new ArrayList<>(); } return this.any; } @@ -236,11 +236,11 @@ return harness; } - LinkedHashMap getItemAttributes() { + LinkedHashMap getItemAttributes() { return xmlAttributes; } - LinkedHashMap getItemElements() { + LinkedHashMap getItemElements() { return xmlElements; }