-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
None
-
inapplicable
It's observed that the below code fails with ProviderNotFoundException when run with --limit-modules java.base, even though the code not referring any source outside java.base module. It passes with out any module restriction.
public static void main(String[] args) {
Path filePath = Path.of("file");
try {
FileSystem fileSystem = FileSystems.newFileSystem(filePath);
System.out.println(" The fileSystem is " + fileSystem);
} catch (IOException exception) {
exception.printStackTrace();
} catch (ProviderNotFoundException ex) {
System.out.println(" Not expected : " + ex.getMessage());
}
}
public static void main(String[] args) {
Path filePath = Path.of("file");
try {
FileSystem fileSystem = FileSystems.newFileSystem(filePath);
System.out.println(" The fileSystem is " + fileSystem);
} catch (IOException exception) {
exception.printStackTrace();
} catch (ProviderNotFoundException ex) {
System.out.println(" Not expected : " + ex.getMessage());
}
}