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

Misuse of RampartException constructor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.6.2
    • 1.7.1
    • rampart-core
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: