src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java

Print this page

        

*** 29,39 **** import java.nio.file.Path; import java.nio.file.Paths; public class ClassNameSourceProvider implements SourceProvider { ! public final static String TYPE = "classname"; private final ClassLoader classLoader; public ClassNameSourceProvider(FileSupport fileSupport) { String classPath = System.getProperty("java.class.path"); ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader(); --- 29,39 ---- import java.nio.file.Path; import java.nio.file.Paths; public class ClassNameSourceProvider implements SourceProvider { ! public final static String TYPE = "class"; private final ClassLoader classLoader; public ClassNameSourceProvider(FileSupport fileSupport) { String classPath = System.getProperty("java.class.path"); ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
*** 45,54 **** --- 45,58 ---- } } @Override public ClassSource findSource(String name, SearchPath searchPath) { + Path path = Paths.get(name); + if (ClassSource.pathIsClassFile(path)) { + name = ClassSource.makeClassName(path); + } try { classLoader.loadClass(name); return new ClassNameSource(name, classLoader); } catch (ClassNotFoundException e) { return null;
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/classname/ClassNameSourceProvider.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File