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

ActionMessages toString() method desirable

           Summary: ActionMessages toString() method desirable
           Product: Struts
           Version: Unknown
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This would make logging easier. 

In ActionMessages:

    /**
     * @return string representation of the object
     */
    public String toString() {

        StringBuffer buff = new StringBuffer();
        
        for (Iterator i = messages.values().iterator(); i.hasNext();) {
            ActionMessageItem ami = (ActionMessageItem) i.next();
            buff.append(ami.getList());
        }

        return buff.toString();

    }


In ActionMessage:
    /**
     * @return string representation of this message
     */
    public String toString()
    {
        return this.key;
    }

I am slightly dubious about the effects this would have on serialization in a
distributed environment, since I have no experience with that. It seems to me
that the "implements Serializable" on these classes has no other effect than
allowing it to be placed in the session when the appserver is enforcing
distributability.

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

Reply via email to