You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2015/02/20 08:58:15 UTC
svn commit: r1661071 -
/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
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);