8321739: Source launcher fails with "Not a directory" error
Reviewed-by: jlahoda
This commit is contained in:
parent
5718039a46
commit
df4ed7eff7
@ -177,7 +177,7 @@ final class MemoryContext {
|
|||||||
var file = descriptor.sourceRootPath().resolve(path);
|
var file = descriptor.sourceRootPath().resolve(path);
|
||||||
|
|
||||||
// Trivial case: no matching source file exists
|
// Trivial case: no matching source file exists
|
||||||
if (Files.notExists(file)) return null;
|
if (!Files.exists(file)) return null;
|
||||||
|
|
||||||
// Compile source file (unit) with similar options as the program.
|
// Compile source file (unit) with similar options as the program.
|
||||||
var opts = options.forSubsequentCompilations();
|
var opts = options.forSubsequentCompilations();
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8210009
|
* @bug 8210009 8321739
|
||||||
* @summary Source Launcher classloader should support getResource and getResourceAsStream
|
* @summary Source Launcher classloader should support getResource and getResourceAsStream
|
||||||
* @enablePreview
|
* @enablePreview
|
||||||
* @modules jdk.compiler
|
* @modules jdk.compiler
|
||||||
@ -41,7 +41,7 @@ import toolbox.ToolBox;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The body of this test is in ${test.src}/src/p/q/CLTest.java,
|
* The body of this test is in ${test.src}/src/p/q/CLTest.java,
|
||||||
* which is executed in single-file source-launcher mode,
|
* which is executed in source-launcher mode,
|
||||||
* in order to test the classloader used to launch such programs.
|
* in order to test the classloader used to launch such programs.
|
||||||
*/
|
*/
|
||||||
public class GetResourceTest {
|
public class GetResourceTest {
|
||||||
|
1
test/langtools/tools/javac/launcher/src/java
Normal file
1
test/langtools/tools/javac/launcher/src/java
Normal file
@ -0,0 +1 @@
|
|||||||
|
A text file named `java` to simulate https://bugs.openjdk.org/browse/JDK-8321739
|
Loading…
x
Reference in New Issue
Block a user