ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r354099 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce: P4Reopen.java P4Revert.java P4Sync.java
Date Mon, 05 Dec 2005 17:06:20 GMT
Author: jkf
Date: Mon Dec  5 09:06:14 2005
New Revision: 354099

URL: http://svn.apache.org/viewcvs?rev=354099&view=rev
Log:
PR 37765: Fixing NPE thanks to Dave Brosius

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java?rev=354099&r1=354098&r2=354099&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
Mon Dec  5 09:06:14 2005
@@ -39,7 +39,7 @@
      * @throws BuildException if the change parameter is null or empty
      */
     public void setToChange(String toChange) throws BuildException {
-        if (toChange == null && !toChange.equals("")) {
+        if (toChange == null || toChange.equals("")) {
             throw new BuildException("P4Reopen: tochange cannot be null or empty");
         }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java?rev=354099&r1=354098&r2=354099&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
Mon Dec  5 09:06:14 2005
@@ -40,7 +40,7 @@
      * @throws BuildException if the change list is null or empty string
      */
     public void setChange(String revertChange) throws BuildException {
-        if (revertChange == null && !revertChange.equals("")) {
+        if (revertChange == null || revertChange.equals("")) {
             throw new BuildException("P4Revert: change cannot be null or empty");
         }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java?rev=354099&r1=354098&r2=354099&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java Mon
Dec  5 09:06:14 2005
@@ -58,7 +58,7 @@
      * @throws BuildException if label is null or empty string
      */
     public void setLabel(String label) throws BuildException {
-        if (label == null && !label.equals("")) {
+        if (label == null || label.equals("")) {
             throw new BuildException("P4Sync: Labels cannot be Null or Empty");
         }
 



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


Mime
View raw message