Xerces2-J
  1. Xerces2-J
  2. XERCESJ-1261

NullPointerException in org.xml.sax.ext.Attributes2Impl#addAttribute

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.9.0
    • Fix Version/s: None
    • Component/s: SAX
    • Labels:
      None
    • Environment:
      Any

      Description

      The following code generates a NullPointerException

      new org.xml.sax.ext.Attributes2Impl().addAttribute("","","","","");

      This is caused by the check of getLength against specified.length. After the constructor is called the specified and declared arrays are null. Adding a null check would resolve this problem.

        Activity

        Hide
        Michael Glavassevich added a comment - - edited

        All of xml-apis.jar (SAX, DOM, JAXP) come from XML Commons, so you've reported this against the wrong project. I have no way of transferring it over there since XML Commons uses Bugzilla, however this is most likely a duplicate of: http://issues.apache.org/bugzilla/show_bug.cgi?id=38316.

        Show
        Michael Glavassevich added a comment - - edited All of xml-apis.jar (SAX, DOM, JAXP) come from XML Commons, so you've reported this against the wrong project. I have no way of transferring it over there since XML Commons uses Bugzilla, however this is most likely a duplicate of: http://issues.apache.org/bugzilla/show_bug.cgi?id=38316 .
        Hide
        Pepijn Van Eeckhoudt added a comment -

        My bad. This is indeed a duplicate of the issue you referred to.

        Show
        Pepijn Van Eeckhoudt added a comment - My bad. This is indeed a duplicate of the issue you referred to.

          People

          • Assignee:
            Unassigned
            Reporter:
            Pepijn Van Eeckhoudt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development