mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8163190: Clarify JavaFileManager use of \"module location\"
Reviewed-by: jlahoda
This commit is contained in:
parent
f742ef0ed0
commit
c7374cd58f
20 changed files with 214 additions and 117 deletions
|
@ -73,8 +73,8 @@ public class T6397104 {
|
|||
if (hasLocation) {
|
||||
for (Location location : StandardLocation.values()) {
|
||||
System.err.format(" location:%s, moduleLocn:%b%n",
|
||||
location, location.isModuleLocation());
|
||||
if (location.isModuleLocation()) {
|
||||
location, location.isModuleOrientedLocation());
|
||||
if (!location.isOutputLocation()) {
|
||||
continue;
|
||||
}
|
||||
fm.setLocation(location, Arrays.asList(new File(".")));
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TestClientCodeWrapper extends JavacTestingAbstractProcessor {
|
|||
defaultFileManager = fm;
|
||||
|
||||
for (Method m: getMethodsExcept(JavaFileManager.class,
|
||||
"close", "getJavaFileForInput", "getModuleLocation", "getServiceLoader")) {
|
||||
"close", "getJavaFileForInput", "getLocationForModule", "getServiceLoader")) {
|
||||
test(m);
|
||||
}
|
||||
|
||||
|
@ -401,15 +401,15 @@ public class TestClientCodeWrapper extends JavacTestingAbstractProcessor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Location getModuleLocation(Location location, String moduleName) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "getModuleLocation");
|
||||
return super.getModuleLocation(location, moduleName);
|
||||
public Location getLocationForModule(Location location, String moduleName) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "getLocationForModule");
|
||||
return super.getLocationForModule(location, moduleName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getModuleLocation(Location location, JavaFileObject fo, String pkgName) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "getModuleLocation");
|
||||
return super.getModuleLocation(location, fo, pkgName);
|
||||
public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "getLocationForModule");
|
||||
return super.getLocationForModule(location, fo, pkgName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -419,9 +419,9 @@ public class TestClientCodeWrapper extends JavacTestingAbstractProcessor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Set<Location>> listModuleLocations(Location location) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "listModuleLocations");
|
||||
return super.listModuleLocations(location);
|
||||
public Iterable<Set<Location>> listLocationsForModules(Location location) throws IOException {
|
||||
throwUserExceptionIfNeeded(fileManagerMethod, "listLocationsForModules");
|
||||
return super.listLocationsForModules(location);
|
||||
}
|
||||
|
||||
public FileObject wrap(FileObject fo) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue