Return-Path: Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 14338 invoked by uid 500); 15 Oct 2000 03:35:04 -0000 Delivered-To: apmail-jakarta-struts-cvs@apache.org Received: (qmail 14334 invoked by uid 1059); 15 Oct 2000 03:35:02 -0000 Date: 15 Oct 2000 03:35:02 -0000 Message-ID: <20001015033502.14333.qmail@locus.apache.org> From: craigmcc@locus.apache.org To: jakarta-struts-cvs@apache.org Subject: cvs commit: jakarta-struts/src/example/org/apache/struts/example ApplicationResources.properties DatabaseServlet.java EditRegistrationAction.java EditSubscriptionAction.java LogonForm.java RegistrationForm.java SaveRegistrationAction.java SaveSubscriptionAction.java Subscription.java SubscriptionForm.java User.java craigmcc 00/10/14 20:35:01 Modified: src/example/org/apache/struts/example ApplicationResources.properties DatabaseServlet.java EditRegistrationAction.java EditSubscriptionAction.java LogonForm.java RegistrationForm.java SaveRegistrationAction.java SaveSubscriptionAction.java Subscription.java SubscriptionForm.java User.java Log: Bring the Struts example application up-to-date with respect to recent changes in the org.apache.struts.action and org.apache.struts.util packages: - Use reset() methods on each form bean to reset properties to default values. - Eliminate special-case handling for changing strings from null to "", since it is unnecesasry. - Use PropertyUtils.copyProperties() to populate form beans (in the /editRegistration and /editSubscription actions) and to update the underlying data beans (in the /saveRegistration and /saveSubscription actions). - Added an "autoConnect" property to the Subscription object, which can be used to demonstrate that checkboxes now work correctly. In addition, the following bugs were fixed: - Correct the XML generation when DatabaseServlet so that it would not generate the literal string "null" for a null String property value. Revision Changes Path 1.4 +2 -0 jakarta-struts/src/example/org/apache/struts/example/ApplicationResources.properties Index: ApplicationResources.properties =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/ApplicationResources.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ApplicationResources.properties 2000/08/01 20:03:22 1.3 +++ ApplicationResources.properties 2000/10/15 03:34:51 1.4 @@ -21,6 +21,7 @@ errors.footer=
errors.header=

Validation Error

You must correct the following error(s) before proceeding: * * @author Craig R. McClanahan - * @version $Revision: 1.4 $ $Date: 2000/10/12 21:53:41 $ + * @version $Revision: 1.5 $ $Date: 2000/10/15 03:34:53 $ */ public final class LogonForm extends ActionForm { @@ -91,13 +91,13 @@ /** * The password. */ - private String password = ""; + private String password = null; /** * The username. */ - private String username = ""; + private String username = null; // ----------------------------------------------------------- Properties @@ -120,10 +120,7 @@ */ public void setPassword(String password) { - if (password == null) - this.password = ""; - else - this.password = password; + this.password = password; } @@ -145,10 +142,7 @@ */ public void setUsername(String username) { - if (username == null) - this.username = ""; - else - this.username = username; + this.username = username; } @@ -157,13 +151,27 @@ /** + * Reset all properties to their default values. + * + * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public void reset(ActionMapping mapping, HttpServletRequest request) { + + this.password = null; + this.username = null; + + } + + + /** * Validate the properties that have been set from this HTTP request, * and return an ActionErrors object that encapsulates any * validation errors that have been found. If no errors are found, return * null or an ActionErrors object with no * recorded error messages. * - * @param mapping The ActionMapping used to select this instance + * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public ActionErrors validate(ActionMapping mapping, 1.8 +37 -39 jakarta-struts/src/example/org/apache/struts/example/RegistrationForm.java Index: RegistrationForm.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/RegistrationForm.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RegistrationForm.java 2000/10/12 21:53:42 1.7 +++ RegistrationForm.java 2000/10/15 03:34:53 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/RegistrationForm.java,v 1.7 2000/10/12 21:53:42 craigmcc Exp $ - * $Revision: 1.7 $ - * $Date: 2000/10/12 21:53:42 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/RegistrationForm.java,v 1.8 2000/10/15 03:34:53 craigmcc Exp $ + * $Revision: 1.8 $ + * $Date: 2000/10/15 03:34:53 $ * * ==================================================================== * @@ -90,7 +90,7 @@ * * * @author Craig R. McClanahan - * @version $Revision: 1.7 $ $Date: 2000/10/12 21:53:42 $ + * @version $Revision: 1.8 $ $Date: 2000/10/15 03:34:53 $ */ public final class RegistrationForm extends ActionForm { @@ -108,38 +108,38 @@ /** * The from address. */ - private String fromAddress = ""; + private String fromAddress = null; /** * The full name. */ - private String fullName = ""; + private String fullName = null; /** * The password. */ - private String password = ""; + private String password = null; /** * The confirmation password. */ - private String password2 = ""; + private String password2 = null; /** * The reply to address. */ - private String replyToAddress = ""; + private String replyToAddress = null; /** * The username. */ - private String username = ""; + private String username = null; // ----------------------------------------------------------- Properties @@ -162,10 +162,7 @@ */ public void setAction(String action) { - if (action == null) - this.action = ""; - else - this.action = action; + this.action = action; } @@ -187,10 +184,7 @@ */ public void setFromAddress(String fromAddress) { - if (fromAddress == null) - this.fromAddress = ""; - else - this.fromAddress = fromAddress; + this.fromAddress = fromAddress; } @@ -212,10 +206,7 @@ */ public void setFullName(String fullName) { - if (fullName == null) - this.fullName = ""; - else - this.fullName = fullName; + this.fullName = fullName; } @@ -237,10 +228,7 @@ */ public void setPassword(String password) { - if (password == null) - this.password = ""; - else - this.password = password; + this.password = password; } @@ -262,10 +250,7 @@ */ public void setPassword2(String password2) { - if (password2 == null) - this.password2 = ""; - else - this.password2 = password2; + this.password2 = password2; } @@ -287,10 +272,7 @@ */ public void setReplyToAddress(String replyToAddress) { - if (replyToAddress == null) - this.replyToAddress = ""; - else - this.replyToAddress = replyToAddress; + this.replyToAddress = replyToAddress; } @@ -312,10 +294,7 @@ */ public void setUsername(String username) { - if (username == null) - this.username = ""; - else - this.username = username; + this.username = username; } @@ -324,13 +303,32 @@ /** + * Reset all properties to their default values. + * + * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public void reset(ActionMapping mapping, HttpServletRequest request) { + + this.action = "Create"; + this.fromAddress = null; + this.fullName = null; + this.password = null; + this.password2 = null; + this.replyToAddress = null; + this.username = null; + + } + + + /** * Validate the properties that have been set from this HTTP request, * and return an ActionErrors object that encapsulates any * validation errors that have been found. If no errors are found, return * null or an ActionErrors object with no * recorded error messages. * - * @param mapping The ActionMapping used to select this instance + * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public ActionErrors validate(ActionMapping mapping, 1.10 +35 -24 jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java Index: SaveRegistrationAction.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- SaveRegistrationAction.java 2000/10/12 21:53:42 1.9 +++ SaveRegistrationAction.java 2000/10/15 03:34:53 1.10 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v 1.9 2000/10/12 21:53:42 craigmcc Exp $ - * $Revision: 1.9 $ - * $Date: 2000/10/12 21:53:42 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v 1.10 2000/10/15 03:34:53 craigmcc Exp $ + * $Revision: 1.10 $ + * $Date: 2000/10/15 03:34:53 $ * * ==================================================================== * @@ -64,6 +64,7 @@ import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.util.Locale; import java.util.Hashtable; import javax.servlet.RequestDispatcher; @@ -79,6 +80,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.struts.util.MessageResources; +import org.apache.struts.util.PropertyUtils; /** @@ -87,7 +89,7 @@ * registration is created, the user is also implicitly logged on. * * @author Craig R. McClanahan - * @version $Revision: 1.9 $ $Date: 2000/10/12 21:53:42 $ + * @version $Revision: 1.10 $ $Date: 2000/10/15 03:34:53 $ */ public final class SaveRegistrationAction extends Action { @@ -127,16 +129,23 @@ action = "Create"; Hashtable database = (Hashtable) servlet.getServletContext().getAttribute(Constants.DATABASE_KEY); + if (servlet.getDebug() >= 1) + servlet.log("SaveRegistrationAction: Processing " + action + + " action"); // Is there a currently logged on user (unless creating)? User user = (User) session.getAttribute(Constants.USER_KEY); - if (!"Create".equals(action) && (user == null)) + if (!"Create".equals(action) && (user == null)) { + if (servlet.getDebug() >= 1) + servlet.log(" User is not logged on in session " + + session.getId()); return (servlet.findForward("logon")); + } // Was this transaction cancelled? if (isCancelled(request)) { if (servlet.getDebug() >= 1) - servlet.log("SaveRegistrationAction: Transaction '" + action + + servlet.log(" Transaction '" + action + "' was cancelled"); if (mapping.getAttribute() != null) session.removeAttribute(mapping.getAttribute()); @@ -144,9 +153,9 @@ return (mapping.findForward("success")); } - // All required validations were done in the form bean - // Validate the request parameters specified by the user + if (servlet.getDebug() >= 1) + servlet.log(" Performing extra validations"); String value = null; ActionErrors errors = new ActionErrors(); value = regform.getUsername(); @@ -177,26 +186,26 @@ user = new User(); user.setUsername(regform.getUsername()); } - if (regform.getPassword().length() > 0) - user.setPassword(regform.getPassword()); - if (regform.getFullName().length() > 0) - user.setFullName(regform.getFullName()); - else - user.setFullName(null); - if (regform.getFromAddress().length() > 0) - user.setFromAddress(regform.getFromAddress()); - else - user.setFromAddress(null); - if (regform.getReplyToAddress().length() > 0) - user.setReplyToAddress(regform.getReplyToAddress()); - else - user.setReplyToAddress(null); + try { + PropertyUtils.copyProperties(user, regform); + } catch (InvocationTargetException e) { + Throwable t = e.getTargetException(); + if (t == null) + t = e; + servlet.log("Registration.populate", t); + throw new ServletException("Registration.populate", t); + } catch (Throwable t) { + servlet.log("Registration.populate", t); + throw new ServletException("Subscription.populate", t); + } + + + // Log the user in if appropriate if ("Create".equals(action)) { database.put(user.getUsername(), user); session.setAttribute(Constants.USER_KEY, user); if (servlet.getDebug() >= 1) - servlet.log("SaveRegisrationAction: User '" + - user.getUsername() + + servlet.log(" User '" + user.getUsername() + "' logged on in session " + session.getId()); } @@ -205,6 +214,8 @@ session.removeAttribute(mapping.getAttribute()); // Forward control to the specified success URI + if (servlet.getDebug() >= 1) + servlet.log(" Forwarding to success page"); return (mapping.findForward("success")); } 1.10 +33 -17 jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java Index: SaveSubscriptionAction.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- SaveSubscriptionAction.java 2000/10/12 21:53:42 1.9 +++ SaveSubscriptionAction.java 2000/10/15 03:34:54 1.10 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v 1.9 2000/10/12 21:53:42 craigmcc Exp $ - * $Revision: 1.9 $ - * $Date: 2000/10/12 21:53:42 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v 1.10 2000/10/15 03:34:54 craigmcc Exp $ + * $Revision: 1.10 $ + * $Date: 2000/10/15 03:34:54 $ * * ==================================================================== * @@ -64,6 +64,7 @@ import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.util.Locale; import java.util.Hashtable; import javax.servlet.RequestDispatcher; @@ -79,6 +80,7 @@ import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionServlet; import org.apache.struts.util.MessageResources; +import org.apache.struts.util.PropertyUtils; /** @@ -86,7 +88,7 @@ * updates the mail subscription entered by the user. * * @author Craig R. McClanahan - * @version $Revision: 1.9 $ $Date: 2000/10/12 21:53:42 $ + * @version $Revision: 1.10 $ $Date: 2000/10/15 03:34:54 $ */ public final class SaveSubscriptionAction extends Action { @@ -124,18 +126,24 @@ String action = request.getParameter("action"); if (action == null) action = "?"; + if (servlet.getDebug() >= 1) + servlet.log("SaveSubscriptionAction: Processing " + action + + " action"); // Is there a currently logged on user? User user = (User) session.getAttribute(Constants.USER_KEY); - if (user == null) + if (user == null) { + if (servlet.getDebug() >= 1) + servlet.log(" User is not logged on in session " + + session.getId()); return (servlet.findForward("logon")); + } // Is there a related Subscription object? Subscription subscription = (Subscription) session.getAttribute(Constants.SUBSCRIPTION_KEY); if (subscription == null) { - servlet.log("SaveSubscriptionAction: " + - "Missing subscription for user '" + + servlet.log(" Missing subscription for user '" + user.getUsername() + "'"); response.sendError(HttpServletResponse.SC_BAD_REQUEST, messages.getMessage("error.noSubscription")); @@ -145,7 +153,7 @@ // Was this transaction cancelled? if (isCancelled(request)) { if (servlet.getDebug() >= 1) - servlet.log("SaveSubscriptionAction: Transaction '" + action + + servlet.log(" Transaction '" + action + "' was cancelled"); if (mapping.getAttribute() != null) session.removeAttribute(mapping.getAttribute()); @@ -156,7 +164,7 @@ // Was this transaction a Delete? if (action.equals("Delete")) { if (servlet.getDebug() >= 1) - servlet.log("SaveSubscriptionAction: Deleting mail server '" + + servlet.log(" Deleting mail server '" + subscription.getHost() + "' for user '" + user.getUsername() + "'"); subscription.setHost(null); @@ -170,14 +178,20 @@ // All required validations were done by the form itself // Update the persistent subscription information - if (subform.getHost().length() > 0) - subscription.setHost(subform.getHost()); - if (subform.getUsername().length() > 0) - subscription.setUsername(subform.getUsername()); - if (subform.getPassword().length() > 0) - subscription.setPassword(subform.getPassword()); - if (subform.getType().length() > 0) - subscription.setType(subform.getType()); + if (servlet.getDebug() >= 1) + servlet.log(" Populating database from form bean"); + try { + PropertyUtils.copyProperties(subscription, subform); + } catch (InvocationTargetException e) { + Throwable t = e.getTargetException(); + if (t == null) + t = e; + servlet.log("Subscription.populate", t); + throw new ServletException("Subscription.populate", t); + } catch (Throwable t) { + servlet.log("Subscription.populate", t); + throw new ServletException("Subscription.populate", t); + } // Remove any obsolete session objects if (mapping.getAttribute() != null) @@ -185,6 +199,8 @@ session.removeAttribute(Constants.SUBSCRIPTION_KEY); // Forward control to the specified success URI + if (servlet.getDebug() >= 1) + servlet.log(" Forwarding to success page"); return (mapping.findForward("success")); } 1.3 +55 -4 jakarta-struts/src/example/org/apache/struts/example/Subscription.java Index: Subscription.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/Subscription.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Subscription.java 2000/08/01 20:03:24 1.2 +++ Subscription.java 2000/10/15 03:34:54 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/Subscription.java,v 1.2 2000/08/01 20:03:24 craigmcc Exp $ - * $Revision: 1.2 $ - * $Date: 2000/08/01 20:03:24 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/Subscription.java,v 1.3 2000/10/15 03:34:54 craigmcc Exp $ + * $Revision: 1.3 $ + * $Date: 2000/10/15 03:34:54 $ * * ==================================================================== * @@ -71,7 +71,7 @@ * specific mail server. * * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2000/08/01 20:03:24 $ + * @version $Revision: 1.3 $ $Date: 2000/10/15 03:34:54 $ */ public final class Subscription implements Serializable { @@ -81,6 +81,12 @@ /** + * Should we auto-connect at startup time? + */ + private boolean autoConnect = false; + + + /** * The mail host for this subscription. */ private String host = null; @@ -114,6 +120,28 @@ /** + * Return the auto-connect flag. + */ + public boolean getAutoConnect() { + + return (this.autoConnect); + + } + + + /** + * Set the auto-connect flag. + * + * @param autoConnect The new auto-connect flag + */ + public void setAutoConnect(boolean autoConnect) { + + this.autoConnect = autoConnect; + + } + + + /** * Return the host name. */ public String getHost() { @@ -232,6 +260,29 @@ // ======================================================= Public Methods + + + /** + * Return a String representation of this object. + */ + public String toString() { + + StringBuffer sb = new StringBuffer("Subscription[username="); + sb.append(username); + if (host != null) { + sb.append(", host="); + sb.append(host); + } + if (user != null) { + sb.append(", user="); + sb.append(user.getUsername()); + } + sb.append(", autoConnect="); + sb.append(autoConnect); + sb.append("]"); + return (sb.toString()); + + } } 1.8 +59 -29 jakarta-struts/src/example/org/apache/struts/example/SubscriptionForm.java Index: SubscriptionForm.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SubscriptionForm.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- SubscriptionForm.java 2000/10/12 21:53:43 1.7 +++ SubscriptionForm.java 2000/10/15 03:34:55 1.8 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SubscriptionForm.java,v 1.7 2000/10/12 21:53:43 craigmcc Exp $ - * $Revision: 1.7 $ - * $Date: 2000/10/12 21:53:43 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SubscriptionForm.java,v 1.8 2000/10/15 03:34:55 craigmcc Exp $ + * $Revision: 1.8 $ + * $Date: 2000/10/15 03:34:55 $ * * ==================================================================== * @@ -84,7 +84,7 @@ * * * @author Craig R. McClanahan - * @version $Revision: 1.7 $ $Date: 2000/10/12 21:53:43 $ + * @version $Revision: 1.8 $ $Date: 2000/10/15 03:34:55 $ */ public final class SubscriptionForm extends ActionForm { @@ -100,27 +100,33 @@ /** + * Should we auto-connect at startup time? + */ + private boolean autoConnect = false; + + + /** * The host name. */ - private String host = ""; + private String host = null; /** * The password. */ - private String password = ""; + private String password = null; /** * The subscription type. */ - private String type = ""; + private String type = null; /** * The username. */ - private String username = ""; + private String username = null; // ----------------------------------------------------------- Properties @@ -142,12 +148,30 @@ * @param action The new maintenance action. */ public void setAction(String action) { + + this.action = action; + + } + + + /** + * Return the auto-connect flag. + */ + public boolean getAutoConnect() { + + return (this.autoConnect); + + } - if (action == null) - this.action = ""; - else - this.action = action; + /** + * Set the auto-connect flag. + * + * @param autoConnect The new auto-connect flag + */ + public void setAutoConnect(boolean autoConnect) { + + this.autoConnect = autoConnect; } @@ -168,10 +192,7 @@ */ public void setHost(String host) { - if (host == null) - this.host = ""; - else - this.host = host; + this.host = host; } @@ -193,10 +214,7 @@ */ public void setPassword(String password) { - if (password == null) - this.password = ""; - else - this.password = password; + this.password = password; } @@ -218,10 +236,7 @@ */ public void setType(String type) { - if (type == null) - this.type = ""; - else - this.type = type; + this.type = type; } @@ -243,10 +258,7 @@ */ public void setUsername(String username) { - if (username == null) - this.username = ""; - else - this.username = username; + this.username = username; } @@ -255,13 +267,31 @@ /** + * Reset all properties to their default values. + * + * @param mapping The mapping used to select this instance + * @param request The servlet request we are processing + */ + public void reset(ActionMapping mapping, HttpServletRequest request) { + + this.action = "Create"; + this.autoConnect = false; + this.host = null; + this.password = null; + this.type = null; + this.username = null; + + } + + + /** * Validate the properties that have been set from this HTTP request, * and return an ActionErrors object that encapsulates any * validation errors that have been found. If no errors are found, return * null or an ActionErrors object with no * recorded error messages. * - * @param mapping The ActionMapping used to select this instance + * @param mapping The mapping used to select this instance * @param request The servlet request we are processing */ public ActionErrors validate(ActionMapping mapping, 1.3 +25 -4 jakarta-struts/src/example/org/apache/struts/example/User.java Index: User.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/User.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- User.java 2000/08/01 20:03:25 1.2 +++ User.java 2000/10/15 03:34:55 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/User.java,v 1.2 2000/08/01 20:03:25 craigmcc Exp $ - * $Revision: 1.2 $ - * $Date: 2000/08/01 20:03:25 $ + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/User.java,v 1.3 2000/10/15 03:34:55 craigmcc Exp $ + * $Revision: 1.3 $ + * $Date: 2000/10/15 03:34:55 $ * * ==================================================================== * @@ -72,7 +72,7 @@ * Object that represents a registered user of the mail reader application. * * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2000/08/01 20:03:25 $ + * @version $Revision: 1.3 $ $Date: 2000/10/15 03:34:55 $ */ public final class User implements Serializable { @@ -264,6 +264,27 @@ } return (results); } + + } + + + /** + * Return a String representation of this object. + */ + public String toString() { + + StringBuffer sb = new StringBuffer("User[username="); + sb.append(username); + if (fullName != null) { + sb.append(", fullName="); + sb.append(fullName); + } + if (replyToAddress != null) { + sb.append(", replyToAddres="); + sb.append(replyToAddress); + } + sb.append("]"); + return (sb.toString()); }