Project

Profile

Help

Revision ca025b0e

Added by Michael Kay almost 13 years ago

Fix bug 2564159 - null returned by XmlStreamReader.getAttributeType() causes NPE

View differences:

latest9.1/bj/net/sf/saxon/pull/StaxBridge.java
767 767
         */
768 768

  
769 769
        public boolean isId(int index) {
770
            return reader.getAttributeType(index).equals("ID");
770
            return "ID".equals(reader.getAttributeType(index));
771 771
        }
772 772

  
773 773
        /**
......
776 776

  
777 777
        public boolean isIdref(int index) {
778 778
            String attributeType = reader.getAttributeType(index);
779
            return attributeType.equals("IDREF") || attributeType.equals("IDREFS");
779
            return "IDREF".equals(attributeType) || "IDREFS".equals(attributeType);
780 780
        }
781 781
    }
782 782

  

Also available in: Unified diff