test/jdk/java/net/URLClassLoader/NullURLTest.java
changeset 49117 0a93645a57f1
parent 47216 71c04702a3d5
--- a/test/jdk/java/net/URLClassLoader/NullURLTest.java	Thu Mar 01 13:08:06 2018 +0100
+++ b/test/jdk/java/net/URLClassLoader/NullURLTest.java	Thu Mar 01 19:01:34 2018 -0800
@@ -71,14 +71,14 @@
         } catch (NullPointerException e) {
             // expected
         }
-        // This section should be uncommented if 8026517 is fixed.
-//        try {
-//            loader = new URLClassLoader(invalidURLArray);
-//            System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
-//            failures++;
-//        } catch (NullPointerException e) {
-//            // expected
-//        }
+
+        try {
+            loader = new URLClassLoader(invalidURLArray);
+            System.err.println("URLClassLoader(invalidURLArray) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
 
         try {
             loader = new URLClassLoader(validURLArray, null);
@@ -93,14 +93,14 @@
         } catch (NullPointerException e) {
             // expected
         }
-        // This section should be uncommented if 8026517 is fixed.
-//        try {
-//            loader = new URLClassLoader(invalidURLArray, null);
-//            System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
-//            failures++;
-//        } catch (NullPointerException e) {
-//            // expected
-//        }
+
+        try {
+            loader = new URLClassLoader(invalidURLArray, null);
+            System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
 
         try {
             loader = new URLClassLoader(validURLArray, null, null);
@@ -115,14 +115,14 @@
         } catch (NullPointerException e) {
             // expected
         }
-        // This section should be uncommented if 8026517 is fixed.
-//        try {
-//            loader = new URLClassLoader(invalidURLArray, null, null);
-//            System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
-//            failures++;
-//        } catch (NullPointerException e) {
-//            // expected
-//        }
+
+        try {
+            loader = new URLClassLoader(invalidURLArray, null, null);
+            System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
 
         try {
             loader = URLClassLoader.newInstance(validURLArray);
@@ -137,14 +137,14 @@
         } catch (NullPointerException e) {
             // expected
         }
-        // This section should be uncommented if 8026517 is fixed.
-//        try {
-//            loader = URLClassLoader.newInstance(invalidURLArray);
-//            System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
-//            failures++;
-//        } catch (NullPointerException e) {
-//            // expected
-//        }
+
+        try {
+            loader = URLClassLoader.newInstance(invalidURLArray);
+            System.err.println("URLClassLoader.newInstance(invalidURLArray) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
 
         try {
             loader = URLClassLoader.newInstance(validURLArray, null);
@@ -159,14 +159,14 @@
         } catch (NullPointerException e) {
             // expected
         }
-        // This section should be uncommented if 8026517 is fixed.
-//        try {
-//            loader = URLClassLoader.newInstance(invalidURLArray, null);
-//            System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
-//            failures++;
-//        } catch (NullPointerException e) {
-//            // expected
-//        }
+
+        try {
+            loader = URLClassLoader.newInstance(invalidURLArray, null);
+            System.err.println("URLClassLoader.newInstance(invalidURLArray, null) did not throw NPE");
+            failures++;
+        } catch (NullPointerException e) {
+            // expected
+        }
 
         if (failures != 0) {
             throw new Exception("URLClassLoader NullURLTest had "+failures+" failures!");