--- old/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java 2014-02-20 15:25:12.684312236 -0800 +++ new/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java 2014-02-20 15:25:12.534312229 -0800 @@ -50,9 +50,9 @@ class IIONamedNodeMap implements NamedNodeMap { - List nodes; + List nodes; - public IIONamedNodeMap(List nodes) { + public IIONamedNodeMap(List nodes) { this.nodes = nodes; } @@ -61,9 +61,9 @@ } public Node getNamedItem(String name) { - Iterator iter = nodes.iterator(); + Iterator iter = nodes.iterator(); while (iter.hasNext()) { - Node node = (Node)iter.next(); + Node node = iter.next(); if (name.equals(node.getNodeName())) { return node; } @@ -73,7 +73,7 @@ } public Node item(int index) { - Node node = (Node)nodes.get(index); + Node node = nodes.get(index); return node; } @@ -111,9 +111,9 @@ class IIONodeList implements NodeList { - List nodes; + List nodes; - public IIONodeList(List nodes) { + public IIONodeList(List nodes) { this.nodes = nodes; } @@ -125,7 +125,7 @@ if (index < 0 || index > nodes.size()) { return null; } - return (Node)nodes.get(index); + return nodes.get(index); } } @@ -285,7 +285,7 @@ * A List of IIOAttr nodes representing * attributes. */ - private List attributes = new ArrayList(); + private List attributes = new ArrayList<>(); /** * Constructs an empty IIOMetadataNode. @@ -789,7 +789,7 @@ private void removeAttribute(String name, boolean checkPresent) { int numAttributes = attributes.size(); for (int i = 0; i < numAttributes; i++) { - IIOAttr attr = (IIOAttr)attributes.get(i); + IIOAttr attr = attributes.get(i); if (name.equals(attr.getName())) { attr.setOwnerElement(null); attributes.remove(i); @@ -873,12 +873,12 @@ } public NodeList getElementsByTagName(String name) { - List l = new ArrayList(); + List l = new ArrayList<>(); getElementsByTagName(name, l); return new IIONodeList(l); } - private void getElementsByTagName(String name, List l) { + private void getElementsByTagName(String name, List l) { if (nodeName.equals(name)) { l.add(this); }