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

Possible NullPointerException in RampartEngine.isSecurityFault(RampartMessageData)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3, 1.7.0
    • Component/s: rampart-core
    • Labels:
      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

            • Assignee:
              veithen Andreas Veithen
              Reporter:
              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