bug fix in ClassInfo extraClasses

SearchPath slightly updated
Makefile optimized


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1216 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 25 years ago
parent 0966dfcefe
commit c24a2b7133
  1. 10
      jode/jode/bytecode/ClassInfo.java.in
  2. 4
      jode/jode/bytecode/Makefile.am
  3. 2
      jode/jode/bytecode/SearchPath.java

@ -95,7 +95,12 @@ public class ClassInfo extends BinaryInfo {
public final static ClassInfo javaLangObject = forName("java.lang.Object");
public static void setClassPath(String path) {
classpath = new SearchPath(path);
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();
@ -107,6 +112,7 @@ public class ClassInfo extends BinaryInfo {
ci.removeAllAttributes();
}
}
}
public static boolean exists(String name) {
return classpath.exists(name.replace('.', '/') + ".class");
@ -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

@ -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) $^

@ -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

Loading…
Cancel
Save