soot-oss / soot

Soot - A Java optimization framework
GNU Lesser General Public License v2.1
2.85k stars 706 forks source link

Add AsmJava9ClassProvider after other class providers. This allows se… #1991

Closed senguptaaritra closed 1 year ago

senguptaaritra commented 1 year ago

The class providers and their order determine how a class is searched in the soot classpath. AsmJava9ClassProvider which was added ahead of all class providers does not search the classpath paths and instead searches a class in the Java 9 modules. This affects the expected behavior when a stub is provided for example for JDK classes, where Soot loads the class from Java 9 module instead of the stub. This PR adds the AsmJava9ClassProvider at the end, which allows other class providers that can look into Jars to look for a class before AsmJava9ClassProvider.