Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1230

DOM Normalizer throws an NPE during namepsace fixup if an Attr node is non-namespace aware

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.0
    • 2.9.1
    • DOM (Level 3 Core)
    • None

    Description

      If normalizeDocument() is called on a Document containing non-namespace aware Attr nodes an NPE will be thrown from the normalizer during namespace fixup. This bug is causing two test cases (infoset07 and wellformed03) in the W3C DOM Level 3 Core test suite to fail:

      1) http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07(org.w3c.domts.JUnitTestCaseAdapter)
      java.lang.NullPointerException
      at org.apache.xerces.util.XMLChar.isValidNCName(Unknown Source)
      at org.apache.xerces.dom.CoreDocumentImpl.checkQName(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.namespaceFixUp(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.normalizeNode(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.normalizeDocument(Unknown Source)
      at org.apache.xerces.dom.CoreDocumentImpl.normalizeDocument(Unknown Source)
      at org.w3c.domts.level3.core.infoset07.runTest(infoset07.java:108)
      at org.w3c.domts.JUnitTestCaseAdapter.runTest(JUnitTestCaseAdapter.java:41)

      2) http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03(org.w3c.domts.JUnitTestCaseAdapter)
      java.lang.NullPointerException
      at org.apache.xerces.util.XMLChar.isValidNCName(Unknown Source)
      at org.apache.xerces.dom.CoreDocumentImpl.checkQName(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.namespaceFixUp(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.normalizeNode(Unknown Source)
      at org.apache.xerces.dom.DOMNormalizer.normalizeDocument(Unknown Source)
      at org.apache.xerces.dom.CoreDocumentImpl.normalizeDocument(Unknown Source)
      at org.w3c.domts.level3.core.wellformed03.runTest(wellformed03.java:108)
      at org.w3c.domts.JUnitTestCaseAdapter.runTest(JUnitTestCaseAdapter.java:41)

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            mrglavas@ca.ibm.com Michael Glavassevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: