< prev index next >

src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataNode.java

Print this page

        

@@ -120,11 +120,11 @@
     public int getLength() {
         return nodes.size();
     }
 
     public Node item(int index) {
-        if (index < 0 || index > nodes.size()) {
+        if (index < 0 || index >= nodes.size()) {
             return null;
         }
         return nodes.get(index);
     }
 }

@@ -880,11 +880,11 @@
         getElementsByTagName(name, l);
         return new IIONodeList(l);
     }
 
     private void getElementsByTagName(String name, List<Node> l) {
-        if (nodeName.equals(name)) {
+        if (nodeName.equals(name) || "*".equals(name)) { 
             l.add(this);
         }
 
         Node child = getFirstChild();
         while (child != null) {
< prev index next >