92 failures++;
93 } catch (NullPointerException e) {
94 // expected
95 }
96 // This section should be uncommented if 8026517 is fixed.
97 // try {
98 // loader = new URLClassLoader(invalidURLArray, null);
99 // System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
100 // failures++;
101 // } catch (NullPointerException e) {
102 // // expected
103 // }
104
105 try {
106 loader = new URLClassLoader(validURLArray, null, null);
107 } catch (Throwable t) {
108 System.err.println("URLClassLoader(validURLArray, null, null) threw " + t);
109 failures++;
110 }
111 try {
112 loader = new URLClassLoader(null, null, null);
113 System.err.println("URLClassLoader(null, null, null) did not throw NPE");
114 failures++;
115 } catch (NullPointerException e) {
116 // expected
117 }
118 // This section should be uncommented if 8026517 is fixed.
119 // try {
120 // loader = new URLClassLoader(invalidURLArray, null, null);
121 // System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
122 // failures++;
123 // } catch (NullPointerException e) {
124 // // expected
125 // }
126
127 try {
128 loader = URLClassLoader.newInstance(validURLArray);
129 } catch (Throwable t) {
130 System.err.println("URLClassLoader.newInstance(validURLArray) threw " + t);
131 failures++;
132 }
|
92 failures++;
93 } catch (NullPointerException e) {
94 // expected
95 }
96 // This section should be uncommented if 8026517 is fixed.
97 // try {
98 // loader = new URLClassLoader(invalidURLArray, null);
99 // System.err.println("URLClassLoader(invalidURLArray, null) did not throw NPE");
100 // failures++;
101 // } catch (NullPointerException e) {
102 // // expected
103 // }
104
105 try {
106 loader = new URLClassLoader(validURLArray, null, null);
107 } catch (Throwable t) {
108 System.err.println("URLClassLoader(validURLArray, null, null) threw " + t);
109 failures++;
110 }
111 try {
112 loader = new URLClassLoader((URL[])null, null, null);
113 System.err.println("URLClassLoader(null, null, null) did not throw NPE");
114 failures++;
115 } catch (NullPointerException e) {
116 // expected
117 }
118 // This section should be uncommented if 8026517 is fixed.
119 // try {
120 // loader = new URLClassLoader(invalidURLArray, null, null);
121 // System.err.println("URLClassLoader(invalidURLArray, null, null) did not throw NPE");
122 // failures++;
123 // } catch (NullPointerException e) {
124 // // expected
125 // }
126
127 try {
128 loader = URLClassLoader.newInstance(validURLArray);
129 } catch (Throwable t) {
130 System.err.println("URLClassLoader.newInstance(validURLArray) threw " + t);
131 failures++;
132 }
|