commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1661071 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
Date Fri, 20 Feb 2015 07:58:15 GMT
Author: ebourg
Date: Fri Feb 20 07:58:15 2015
New Revision: 1661071

URL: http://svn.apache.org/r1661071
Log:
Removed an unused loop in ClassPath (BCEL-176)

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1661071&r1=1661070&r2=1661071&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Fri Feb 20
07:58:15 2015
@@ -261,20 +261,18 @@ public class ClassPath implements Serial
      * @return class file for the java class
      */
     public ClassFile getClassFile( String name, String suffix ) throws IOException {
-        for (PathEntry path : paths) { // TODO why is path not used??
-            ClassFile cf = null;
+        ClassFile cf = null;
 
-            if(parent != null) {
-                cf = parent.getClassFileInternal(name, suffix);
-            }
+        if (parent != null) {
+            cf = parent.getClassFileInternal(name, suffix);
+        }
 
-            if(cf == null) {
-                cf = getClassFileInternal(name,suffix);
-            }
+        if (cf == null) {
+            cf = getClassFileInternal(name, suffix);
+        }
 
-            if(cf != null) {
-                return cf;
-            }
+        if (cf != null) {
+            return cf;
         }
 
         throw new IOException("Couldn't find: " + name + suffix);



Mime
View raw message