commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1453884 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java
Date Thu, 07 Mar 2013 14:16:46 GMT
Author: simonetripodi
Date: Thu Mar  7 14:16:45 2013
New Revision: 1453884

URL: http://svn.apache.org/r1453884
Log:
PMD: These nested if statements could be combined

Modified:
    commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java

Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java?rev=1453884&r1=1453883&r2=1453884&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java
(original)
+++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/ParameterParser.java
Thu Mar  7 14:16:45 2013
@@ -233,11 +233,9 @@ public class ParameterParser {
             int idx = str.length();
             for (int i = 0;  i < separators.length;  i++) {
                 int tmp = str.indexOf(separators[i]);
-                if (tmp != -1) {
-                    if (tmp < idx) {
-                        idx = tmp;
-                        separator = separators[i];
-                    }
+                if (tmp != -1 && tmp < idx) {
+                    idx = tmp;
+                    separator = separators[i];
                 }
             }
         }



Mime
View raw message