ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r579978 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs: cvslib/CvsTagDiff.java optional/i18n/Translate.java optional/perforce/P4Base.java optional/ssh/ScpFromMessageBySftp.java
Date Thu, 27 Sep 2007 11:31:31 GMT
Author: peterreilly
Date: Thu Sep 27 04:31:30 2007
New Revision: 579978

URL: http://svn.apache.org/viewvc?rev=579978&view=rev
Log:
more inner assignments

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
    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/ssh/ScpFromMessageBySftp.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java?rev=579978&r1=579977&r2=579978&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java Thu Sep 27
04:31:30 2007
@@ -289,13 +289,14 @@
                         line = line.substring(FILE_STRING.length());
                     }
 
-                    if ((index = line.indexOf(FILE_IS_NEW)) != -1) {
+                    index = line.indexOf(FILE_IS_NEW);
+                    if (index  != -1) {
                         // it is a new file
                         // set the revision but not the prevrevision
                         String filename = line.substring(0, index);
                         String rev = null;
-                        int indexrev = -1;
-                        if ((indexrev = line.indexOf(REVISION, index)) != -1) {
+                        int indexrev = line.indexOf(REVISION, index);
+                        if (indexrev != -1) {
                             rev = line.substring(indexrev + REVISION.length());
                         }
                         entry = new CvsTagEntry(filename, rev);
@@ -319,8 +320,8 @@
                         // it is a removed file
                         String filename = line.substring(0, index);
                         String rev = null;
-                        int indexrev = -1;
-                        if ((indexrev = line.indexOf(REVISION, index)) != -1) {
+                        int indexrev = line.indexOf(REVISION, index);
+                        if (indexrev != -1) {
                             rev = line.substring(indexrev + REVISION.length());
                         }
                         entry = new CvsTagEntry(filename, null, rev);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java?rev=579978&r1=579977&r2=579978&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java Thu
Sep 27 04:31:30 2007
@@ -457,7 +457,8 @@
                         //Handle line continuations, if any
                         while (value.endsWith("\\")) {
                             value = value.substring(0, value.length() - 1);
-                            if ((line = in.readLine()) != null) {
+                            line = in.readLine();
+                            if (line != null) {
                                 value = value + line.trim();
                             } else {
                                 break;

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?rev=579978&r1=579977&r2=579978&view=diff
==============================================================================
--- 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 Thu
Sep 27 04:31:30 2007
@@ -211,6 +211,7 @@
         //Get default P4 settings from environment - Mark would have done something cool
with
         //introspection here.....:-)
         String tmpprop;
+        // CheckStyle:InnerAssignment OFF
         if ((tmpprop = getProject().getProperty("p4.port")) != null) {
             setPort(tmpprop);
         }
@@ -220,6 +221,7 @@
         if ((tmpprop = getProject().getProperty("p4.user")) != null) {
             setUser(tmpprop);
         }
+        // CheckStyle:InnerAssignment ON
     }
     /**
     *  no usages found for this method

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessageBySftp.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessageBySftp.java?rev=579978&r1=579977&r2=579978&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessageBySftp.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessageBySftp.java
Thu Sep 27 04:31:30 2007
@@ -140,8 +140,8 @@
         String remoteFile = le.getFilename();
         if (!localFile.exists()) {
             String path = localFile.getAbsolutePath();
-            int i = 0;
-            if ((i = path.lastIndexOf(File.pathSeparator)) != -1) {
+            int i = path.lastIndexOf(File.pathSeparator);
+            if (i != -1) {
                 if (path.length() > File.pathSeparator.length()) {
                     new File(path.substring(0, i)).mkdirs();
                 }



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


Mime
View raw message