mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8139607: -release option forces StandardJavaFileManager
Merging a --release specific file manager with the user-provided one, rather than altering the user-provided one. Reviewed-by: jjg, mcimadamore
This commit is contained in:
parent
b97f1bcb37
commit
5f97b69390
15 changed files with 577 additions and 150 deletions
|
@ -123,8 +123,11 @@ public class SetLocationForModule extends TestRunner {
|
|||
checkEqual("override setting 2",
|
||||
fm2.getLocationAsPaths(m), override1);
|
||||
|
||||
Location firstLocation =
|
||||
fm2.listLocationsForModules(locn).iterator().next().iterator().next();
|
||||
|
||||
checkEqual("override setting 2b",
|
||||
fm2.getLocationAsPaths(fm2.listLocationsForModules(locn).iterator().next().iterator().next()),
|
||||
fm2.getLocationAsPaths(firstLocation),
|
||||
override1);
|
||||
}
|
||||
|
||||
|
@ -214,6 +217,19 @@ public class SetLocationForModule extends TestRunner {
|
|||
fm.getLocationAsPaths(fm.listLocationsForModules(locn).iterator().next().iterator().next()),
|
||||
override1);
|
||||
|
||||
try (StandardJavaFileManager fm2 = comp.getStandardFileManager(null, null, null)) {
|
||||
fm2.setLocationForModule(locn, "m", List.of(override1));
|
||||
checkEqual("override setting 1",
|
||||
fm2.getLocationAsPaths(m), override1);
|
||||
|
||||
Location firstLocation =
|
||||
fm2.listLocationsForModules(locn).iterator().next().iterator().next();
|
||||
|
||||
checkEqual("override setting 1b",
|
||||
fm2.getLocationAsPaths(firstLocation),
|
||||
override1);
|
||||
}
|
||||
|
||||
Path override2 = Files.createDirectories(base.resolve("override2"));
|
||||
fm.setLocationFromPaths(m, List.of(override2));
|
||||
checkEqual("override setting 2",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue