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

An incomplete fix for the NPE bugs in XSWildcardDecl.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Incomplete
    • None
    • None
    • Other

    Description

      The fix revision 319317 was aimed to remove an NPE bug on the "fNamespaceList" in the method "getNsConstraintList" of the file "/xerces/java/trunk/src/org/apache/xerces/impl/xs/XSWildcardDecl.java" , but it is incomplete.
      Since the "fNamespaceList" is a class field and also could be null during the run-time execution, it should also be null-checked before being dereferenced in other methods (e.g., Line 1311 in the method "checkFacets").

      The buggy code locations are as bellows:

      Lines 91, 93, 103, and 105 of the method "allowNamespace";
      Line 137 of the method "isSubsetOf";
      Lines 379 and 383 of the method "performIntersectionWith"
      Lines 404, 410, and 411 of the method "areSame"
      Lines 488, 493, 497, 499, 501, and 502 of the method "toString";

      Attachments

        Activity

          People

            Unassigned Unassigned
            guangtai Guangtai Liang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 20m
                20m
                Remaining:
                Remaining Estimate - 20m
                20m
                Logged:
                Time Spent - Not Specified
                Not Specified