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

Misuse of RampartException constructor

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.7.1
    • Component/s: rampart-core
    • Labels:
      None
    • Environment:
      Windows 10 with cygwin, java 1.8.0_60,

      Description

      This code snippet at the beginning of the method RampartMessageData.setWSSecurityVersions incorrectly passes an error message, rather than an error code, to the RampartException constructor, causing further errors in the constructor.

              if (namespace == null || namespace.equals("")) {
                  throw new RampartException("Security policy namespace cannot be null.");
              }
      

      as this stack trace extract shows:

           [java] Caused by: java.lang.RuntimeException: Undefined 'Security policy namespace cannot be null.' resource property
           [java]     at org.apache.rampart.RampartException.getMessage(RampartException.java:81)
           [java]     at org.apache.rampart.RampartException.<init>(RampartException.java:41)
           [java]     at org.apache.rampart.RampartException.<init>(RampartException.java:57)
           [java]     at org.apache.rampart.RampartMessageData.setWSSecurityVersions(RampartMessageData.java:387)
           [java]     at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:261)
      

        Attachments

          Activity

            People

            • Assignee:
              veithen Andreas Veithen
              Reporter:
              jgreifwork Jeff Greif (work)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: