ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java
Date Thu, 02 Aug 2001 16:15:24 GMT
rubys       01/08/02 09:15:24

  Modified:    src/main/org/apache/tools/ant/taskdefs Execute.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
  Log:
  Avoid NPE's - seen when running JUnit on Win2K
  
  Revision  Changes    Path
  1.20      +2 -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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Execute.java	2001/07/30 14:07:31	1.19
  +++ Execute.java	2001/08/02 16:15:23	1.20
  @@ -627,7 +627,7 @@
           public Process exec(Project project, String[] cmd, String[] env, File workingDir)
throws IOException
           {
               File commandDir = workingDir;
  -            if ( workingDir == null ) {
  +            if ( workingDir == null && project != null ) {
                   commandDir = project.getBaseDir();
               }
   
  @@ -712,7 +712,7 @@
   
               // Build the command
               File commandDir = workingDir;
  -            if ( workingDir == null ) {
  +            if ( workingDir == null && project != null ) {
                   commandDir = project.getBaseDir();
               }
   
  
  
  
  1.25      +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- JUnitTask.java	2001/07/22 13:12:29	1.24
  +++ JUnitTask.java	2001/08/02 16:15:24	1.25
  @@ -488,9 +488,9 @@
   
           Execute execute = new Execute(new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN),
watchdog);
           execute.setCommandline(cmd.getCommandline());
  +        execute.setAntRun(project);
           if (dir != null) {
               execute.setWorkingDirectory(dir);
  -            execute.setAntRun(project);
           }
   
           log("Executing: "+cmd.toString(), Project.MSG_VERBOSE);
  
  
  

Mime
View raw message