jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mart...@apache.org
Subject cvs commit: jakarta-taglibs/mailer/src/org/apache/taglibs/mailer HeaderTag.java
Date Mon, 08 Mar 2004 06:18:25 GMT
martinc     2004/03/07 22:18:25

  Modified:    mailer/src/org/apache/taglibs/mailer HeaderTag.java
  Log:
  Use a local variable instead of modifying the attribute value within the
  tag, which is a no-no.
  
  PR: 27144
  Submitted by: Marc Guillemot
  
  Revision  Changes    Path
  1.9       +5 -4      jakarta-taglibs/mailer/src/org/apache/taglibs/mailer/HeaderTag.java
  
  Index: HeaderTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/mailer/src/org/apache/taglibs/mailer/HeaderTag.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- HeaderTag.java	29 Feb 2004 05:04:58 -0000	1.8
  +++ HeaderTag.java	8 Mar 2004 06:18:25 -0000	1.9
  @@ -78,15 +78,16 @@
   	    throw new JspException("header tag not nested within mail tag");
           }
           BodyContent body = getBodyContent();
  -        if (value == null ) {
  -            value = body.getString();
  +        String valueStr = value;
  +        if (valueStr == null ) {
  +            valueStr = body.getString();
           }
           // Clear the body since we only used it as input for the header value
           body.clearBody();
  -        if (value == null) {
  +        if (valueStr == null) {
               throw new JspException("The header tag is empty");
           }
  -        myparent.setHeader(name,value); // set header in parent tag
  +        myparent.setHeader(name,valueStr); // set header in parent tag
   	return SKIP_BODY;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


Mime
View raw message