You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/01/23 22:57:53 UTC

DO NOT REPLY [Bug 16378] New: - org.apache.catalina.authenticator.SingleSignOn.toString() throws NullPointer

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=16378>.
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=16378

org.apache.catalina.authenticator.SingleSignOn.toString() throws NullPointer

           Summary: org.apache.catalina.authenticator.SingleSignOn.toString(
                    ) throws NullPointer
           Product: Tomcat 4
           Version: 4.1.12
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: b_stansberry@hotmail.com


org.apache.catalina.authenticator.SingleSignOn.toString() assumes member 
container has been set, but this class has only a default constructor, so this 
may not be true when the method is first called.

See http://www.jboss.org/forums/thread.jsp?forum=49&thread=8141 for an example 
of how this has caused a bug with the JBoss3.0.4/Tomcat4.1.12 integration.

A possible fix would be: 

    public String toString() 
    {
        
        StringBuffer sb = new StringBuffer();
        if (getContainer() != null)
        {
            sb.append("SingleSignOn[");
            sb.append(getContainer().getName());
            sb.append("]");
        }
        else
        {
            sb.append(getClass().getName());
            sb.append('@');
            sb.append(Integer.toHexString(hashCode()));
        }
        return (sb.toString());

    }

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>