You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/09/11 09:18:35 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant AntTag.java

jstrachan    2002/09/11 00:18:35

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/ant AntTag.java
  Log:
  Applied Stephen Haberman's patch to prevent null pointer exceptions when invoking Ant tasks...
  
  Revision  Changes    Path
  1.10      +8 -5      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTag.java
  
  Index: AntTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTag.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AntTag.java	28 Aug 2002 15:29:53 -0000	1.9
  +++ AntTag.java	11 Sep 2002 07:18:34 -0000	1.10
  @@ -312,11 +312,14 @@
           }
       }
   
  -    public void setAttribute(String name,
  -                             Object value) 
  -    {
  -        super.setAttribute( name,
  -                            value.toString() );
  +    public void setAttribute(String name, Object value) {
  +        if ( value == null ) {
  +            // should we send in null?
  +            super.setAttribute( name, "" );
  +        }
  +        else {
  +            super.setAttribute( name, value.toString() );
  +        }
                               
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>