ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r534433 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce: P4Base.java P4HandlerAdapter.java
Date Wed, 02 May 2007 12:51:03 GMT
Author: bodewig
Date: Wed May  2 05:51:02 2007
New Revision: 534433

URL: http://svn.apache.org/viewvc?view=rev&rev=534433
Log:
Avoid NPE

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java?view=diff&rev=534433&r1=534432&r2=534433
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java Wed
May  2 05:51:02 2007
@@ -286,7 +286,8 @@
                 try {
                     handler.stop();
                 } catch (Exception e) {
-                    log(e.toString(), Project.MSG_ERR);
+                    log("Error stopping execution framework: " + e.toString(),
+                        Project.MSG_ERR);
                 }
             }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java?view=diff&rev=534433&r1=534432&r2=534433
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java
Wed May  2 05:51:02 2007
@@ -73,7 +73,11 @@
      * @see P4Base#execP4Command(String, P4Handler)
      */
     public void stop() {
+        if (myHandler != null) {
+            // might never have been started, forfor example ifif p4
+            // is not on the PATH
         myHandler.stop();
+        }
     }
 
     // CheckStyle:VisibilityModifier OFF - bc



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


Mime
View raw message