< prev index next >

src/java.base/share/classes/jdk/internal/jrtfs/AbstractJrtFileSystem.java

Print this page

        

@@ -100,11 +100,11 @@
         if (options != null) {
             for (LinkOption lo : options) {
                 if (lo == LinkOption.NOFOLLOW_LINKS) {
                     return false;
                 } else if (lo == null) {
-                    throw new NullPointerException();
+                    throw new NullPointerException("LinkOption");
                 } else {
                     throw new AssertionError("should not reach here");
                 }
             }
         }

@@ -114,14 +114,15 @@
     // 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();
+                throw new NullPointerException("OpenOption");
             }
             if (!(option instanceof StandardOpenOption)) {
-                throw new IllegalArgumentException();
+                throw new IllegalArgumentException(
+                   "option class : " + option.getClass().getName());
             }
         }
 
         if (options.contains(StandardOpenOption.WRITE)
                 || options.contains(StandardOpenOption.APPEND)) {

@@ -209,11 +210,11 @@
 
     @Override
     public PathMatcher getPathMatcher(String syntaxAndInput) {
         int pos = syntaxAndInput.indexOf(':');
         if (pos <= 0 || pos == syntaxAndInput.length()) {
-            throw new IllegalArgumentException();
+            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 >