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/tags/ant AntTag.java
Date Wed, 11 Sep 2002 07:18:35 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message