DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10372

SingleSignOn toString() throws NullPointerException

           Summary: SingleSignOn toString() throws NullPointerException
           Product: Tomcat 4
           Version: 4.0 Beta 1
          Platform: Macintosh
               URL: N/A
        OS/Version: MacOS X
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


when the toString method is called when the container fields is null, a 
NullPointerException is thrown. (this is annoying since this exception is prevents use 
in 
jboss.)  

this is caused by the toString() method not checking for a null value. at the moment 
we 
have:

    /**
     * Return a String rendering of this object.
     */
    public String toString() {

        StringBuffer sb = new StringBuffer("SingleSignOn[");
        sb.append(container.getName());
        sb.append("]");
        return (sb.toString());

    }

a simple check for null prevents this exception occuring. for example:

    /**
     * Return a String rendering of this object.
     */
    public String toString() {

        StringBuffer sb = new StringBuffer("SingleSignOn[");
        if (container != null) {
             sb.append(container.getName());
        }
        sb.append("]");
        return (sb.toString());

    }

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to