commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly TagSupport.java
Date Sat, 12 Oct 2002 11:28:00 GMT
jstrachan    2002/10/12 04:28:00

  Modified:    jelly/src/java/org/apache/commons/jelly TagSupport.java
  Log:
  Patch which tidies up the processing of whitespace trimming a bit. I think this could fix
the whitespace bug but needs more testing.
  
  Revision  Changes    Path
  1.18      +11 -10    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagSupport.java
  
  Index: TagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/TagSupport.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- TagSupport.java	20 Aug 2002 05:02:51 -0000	1.17
  +++ TagSupport.java	12 Oct 2002 11:28:00 -0000	1.18
  @@ -161,6 +161,12 @@
       
       /** @return the body of the tag */
       public Script getBody() {
  +        if (! hasTrimmed) {
  +            hasTrimmed = true;
  +            if (isTrim()) {
  +                trimBody();
  +            }
  +        }
           return body;
       }
       
  @@ -184,9 +190,6 @@
        * Invokes the body of this tag using the given output
        */
       public void invokeBody(XMLOutput output) throws Exception {
  -        if ( isTrim() && ! hasTrimmed ) {
  -            trimBody();
  -        }
           getBody().run(context, output);
       }
       
  @@ -278,7 +281,5 @@
               TextScript textScript = (TextScript) body;
               textScript.trimWhitespace();
           }
  -
  -        this.hasTrimmed = true;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message