Skip to content

Commit

Permalink
changes ClassPool#appendSystemPath(). The new implementation appends …
Browse files Browse the repository at this point in the history
…ClassClassPath when the JVM is earlier than 9.
  • Loading branch information
chibash committed Oct 26, 2017
1 parent c9c2097 commit e41e079
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified javassist.jar
Binary file not shown.
8 changes: 6 additions & 2 deletions src/main/javassist/ClassPoolTail.java
Expand Up @@ -240,8 +240,12 @@ public synchronized void removeClassPath(ClassPath cp) {
}

public ClassPath appendSystemPath() {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return appendClassPath(new LoaderClassPath(cl));
if (javassist.bytecode.ClassFile.MAJOR_VERSION < javassist.bytecode.ClassFile.JAVA_9)
return appendClassPath(new ClassClassPath());
else {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return appendClassPath(new LoaderClassPath(cl));
}
}

public ClassPath insertClassPath(String pathname)
Expand Down

0 comments on commit e41e079

Please sign in to comment.