diff --git a/jode/jode/bytecode/ClassInfo.java.in b/jode/jode/bytecode/ClassInfo.java.in index fef3e0d..abb5a01 100644 --- a/jode/jode/bytecode/ClassInfo.java.in +++ b/jode/jode/bytecode/ClassInfo.java.in @@ -95,16 +95,22 @@ public class ClassInfo extends BinaryInfo { public final static ClassInfo javaLangObject = forName("java.lang.Object"); public static void setClassPath(String path) { - classpath = new SearchPath(path); - Iterator i = classes.iterator(); - while (i.hasNext()) { - ClassInfo ci = (ClassInfo) i.next(); - ci.status = 0; - ci.superclass = null; - ci.fields = null; - ci.interfaces = null; - ci.methods = null; - ci.removeAllAttributes(); + setClassPath(new SearchPath(path)); + } + + public static void setClassPath(SearchPath path) { + if (classpath != path) { + classpath = path; + Iterator i = classes.iterator(); + while (i.hasNext()) { + ClassInfo ci = (ClassInfo) i.next(); + ci.status = 0; + ci.superclass = null; + ci.fields = null; + ci.interfaces = null; + ci.methods = null; + ci.removeAllAttributes(); + } } } @@ -240,7 +246,7 @@ public class ClassInfo extends BinaryInfo { int outerPtr = 0; String lastOuterName = getName(); for (int i = count - extraCount - outerCount; - i < count && lastOuterName != null; i++) { + i < count; i++) { InnerClassInfo ici = innerClassInfo[i]; /* If we counted correctly there is no NullPointer diff --git a/jode/jode/bytecode/Makefile.am b/jode/jode/bytecode/Makefile.am index 20aad51..fddc5f8 100644 --- a/jode/jode/bytecode/Makefile.am +++ b/jode/jode/bytecode/Makefile.am @@ -8,7 +8,7 @@ JAVADEP = $(top_builddir)/javaDependencies.pl -subdir=$(subdir)\ CLASSPATH = @CLASSPATH@ CLASSLIB = @CLASSLIB@ SUBSTCP = @SUBSTCP@ -BUILD_CLASSPATH = $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB) +FULL_CLASSPATH := $(shell $(SUBSTCP) $(top_srcdir):$(top_builddir):$(CLASSPATH):$(CLASSLIB)) MY_JAVA_FILES = \ BinaryInfo.java \ @@ -35,7 +35,7 @@ EXTRA_DIST = $(MY_JAVA_FILES) @QUOTE@-include Makefile.dep %.class: %.java - $(JAVAC) -classpath `$(SUBSTCP) $(BUILD_CLASSPATH):$(CLASSLIB)` -d $(top_builddir) $< + $(JAVAC) -classpath $(FULL_CLASSPATH) -d $(top_builddir) $< Makefile.dep: $(MY_JAVA_FILES:.java=.class) $(JAVADEP) $^ diff --git a/jode/jode/bytecode/SearchPath.java b/jode/jode/bytecode/SearchPath.java index 917b2e5..83b864c 100644 --- a/jode/jode/bytecode/SearchPath.java +++ b/jode/jode/bytecode/SearchPath.java @@ -47,7 +47,7 @@ public class SearchPath { /** * We need a different pathSeparatorChar, since ':' (used for most - * UNIX System, is used a protocol separator in URLs. + * UNIX System) is used a protocol separator in URLs. * * We currently allow both pathSeparatorChar and * altPathSeparatorChar and decide if it is a protocol separator