< prev index next >
src/java.base/share/classes/jdk/internal/jrtfs/AbstractJrtFileSystem.java
Print this page
*** 100,110 ****
if (options != null) {
for (LinkOption lo : options) {
if (lo == LinkOption.NOFOLLOW_LINKS) {
return false;
} else if (lo == null) {
! throw new NullPointerException();
} else {
throw new AssertionError("should not reach here");
}
}
}
--- 100,110 ----
if (options != null) {
for (LinkOption lo : options) {
if (lo == LinkOption.NOFOLLOW_LINKS) {
return false;
} else if (lo == null) {
! throw new NullPointerException("LinkOption");
} else {
throw new AssertionError("should not reach here");
}
}
}
*** 114,127 ****
// check that the options passed are supported by (read-only) jrt file system
static void checkOptions(Set<? extends OpenOption> options) {
// check for options of null type and option is an intance of StandardOpenOption
for (OpenOption option : options) {
if (option == null) {
! throw new NullPointerException();
}
if (!(option instanceof StandardOpenOption)) {
! throw new IllegalArgumentException();
}
}
if (options.contains(StandardOpenOption.WRITE)
|| options.contains(StandardOpenOption.APPEND)) {
--- 114,128 ----
// check that the options passed are supported by (read-only) jrt file system
static void checkOptions(Set<? extends OpenOption> options) {
// check for options of null type and option is an intance of StandardOpenOption
for (OpenOption option : options) {
if (option == null) {
! throw new NullPointerException("OpenOption");
}
if (!(option instanceof StandardOpenOption)) {
! throw new IllegalArgumentException(
! "option class : " + option.getClass().getName());
}
}
if (options.contains(StandardOpenOption.WRITE)
|| options.contains(StandardOpenOption.APPEND)) {
*** 209,219 ****
@Override
public PathMatcher getPathMatcher(String syntaxAndInput) {
int pos = syntaxAndInput.indexOf(':');
if (pos <= 0 || pos == syntaxAndInput.length()) {
! throw new IllegalArgumentException();
}
String syntax = syntaxAndInput.substring(0, pos);
String input = syntaxAndInput.substring(pos + 1);
String expr;
if (syntax.equalsIgnoreCase(GLOB_SYNTAX)) {
--- 210,220 ----
@Override
public PathMatcher getPathMatcher(String syntaxAndInput) {
int pos = syntaxAndInput.indexOf(':');
if (pos <= 0 || pos == syntaxAndInput.length()) {
! throw new IllegalArgumentException("pos is " + pos);
}
String syntax = syntaxAndInput.substring(0, pos);
String input = syntaxAndInput.substring(pos + 1);
String expr;
if (syntax.equalsIgnoreCase(GLOB_SYNTAX)) {
< prev index next >