commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly TagSupport.java
Date Wed, 27 Oct 2004 21:50:07 GMT
dion        2004/10/27 14:50:07

  Modified:    jelly/src/java/org/apache/commons/jelly TagSupport.java
  Log:
  Use TagUtils class
  
  Revision  Changes    Path
  1.35      +3 -19     jakarta-commons/jelly/src/java/org/apache/commons/jelly/TagSupport.java
  
  Index: TagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/TagSupport.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- TagSupport.java	25 Oct 2004 19:33:12 -0000	1.34
  +++ TagSupport.java	27 Oct 2004 21:50:07 -0000	1.35
  @@ -20,9 +20,7 @@
   import java.util.Collection;
   import java.util.Iterator;
   
  -import org.apache.commons.jelly.impl.CompositeTextScriptBlock;
  -import org.apache.commons.jelly.impl.ScriptBlock;
  -import org.apache.commons.jelly.impl.TextScript;
  +import org.apache.commons.jelly.util.TagUtils;
   
   /** <p><code>TagSupport</code> an abstract base class which is useful
to
     * inherit from if developing your own tag.</p>
  @@ -243,21 +241,7 @@
        * if they are just whitespace then remove them
        */
       protected void trimBody() {
  -        synchronized(body) {
  -            if ( body instanceof CompositeTextScriptBlock ) {
  -                CompositeTextScriptBlock block = (CompositeTextScriptBlock) body;
  -                block.trimWhitespace();
  -            }
  -            else
  -            if ( body instanceof ScriptBlock ) {
  -                ScriptBlock block = (ScriptBlock) body;
  -                block.trimWhitespace();
  -            }
  -            else if ( body instanceof TextScript ) {
  -                TextScript textScript = (TextScript) body;
  -                textScript.trimWhitespace();
  -            }
  -        }
  +        TagUtils.trimScript(body);
       }
   
       /**
  
  
  

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


Mime
View raw message