Uploaded image for project: 'Rampart'
  1. Rampart
  2. RAMPART-358

Possible NullPointerException in RampartEngine.isSecurityFault(RampartMessageData)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.2
    • 1.6.3, 1.7.0
    • rampart-core
    • None

    Description

      in RampartEngine class I get a NullPointerException in line 369 (method: isSecurityFault). Seems that this line:
      if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS))

      { return true; }

      throws the exception because getTextAsQName() can return null and this should be handled.

      Solution:

      QName faultCodeQName = faultCode.getTextAsQName();
      if (faultCodeQName == null) {
      // handle exception
      return false; // ?
      } else {
      if (faultCodeQName.getNamespaceURI().equals(WSConstants.WSSE_NS))

      { return true; }

      }

      Attachments

        Activity

          People

            veithen Andreas Veithen
            filippo92 Filippo Ortolan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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