ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Wed, 06 Feb 2002 21:47:00 GMT
ehatcher    02/02/06 13:47:00

  Modified:    src/main/org/apache/tools/ant/taskdefs Execute.java
  Log:
  Fix for #6288
  NullPointerException if no environment variables found
  
  Patch supplied by jimbuuck@netscape.net
  
  Revision  Changes    Path
  1.34      +4 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Execute.java	29 Jan 2002 17:36:06 -0000	1.33
  +++ Execute.java	6 Feb 2002 21:47:00 -0000	1.34
  @@ -76,7 +76,7 @@
    *
    * @author thomas.haas@softwired-inc.com
    *
  - * @version $Revision: 1.33 $
  + * @version $Revision: 1.34 $
    */
   public class Execute {
   
  @@ -209,7 +209,9 @@
                   }
               }
               // Since we "look ahead" before adding, there's one last env var.
  -            procEnvironment.addElement(var);
  +            if (var != null) {
  +                procEnvironment.addElement(var);
  +            }
           }
           catch (java.io.IOException exc) {
               exc.printStackTrace();
  
  
  

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


Mime
View raw message