8066131: Update java/nio/charset/Charset/NIOCharsetAvailabilityTest.java to eliminate dependency on sun.misc.Launcher
authoralanb
Wed, 03 Dec 2014 14:34:42 +0000
changeset 27798 614b01b4950f
parent 27797 7734f206f415
child 27799 097b1d6f6894
8066131: Update java/nio/charset/Charset/NIOCharsetAvailabilityTest.java to eliminate dependency on sun.misc.Launcher Reviewed-by: alanb Contributed-by: amy.lu@oracle.com
jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java
--- a/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java	Wed Dec 03 12:00:26 2014 +0100
+++ b/jdk/test/java/nio/charset/Charset/NIOCharsetAvailabilityTest.java	Wed Dec 03 14:34:42 2014 +0000
@@ -31,10 +31,6 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLClassLoader;
 import java.nio.charset.Charset;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -45,7 +41,6 @@
 import java.util.Vector;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
-import sun.misc.Launcher;
 
 
 public class NIOCharsetAvailabilityTest {
@@ -111,18 +106,6 @@
             classPathSegments.insertElementAt(dir, 0);
         }
 
-        // add extensions from the extension class loader
-        ClassLoader appLoader = Launcher.getLauncher().getClassLoader();
-        URLClassLoader extLoader = (URLClassLoader) appLoader.getParent();
-        URL[] urls = extLoader.getURLs();
-        for (int i = 0; i < urls.length; i++) {
-            try {
-                URI uri = new URI(urls[i].toString());
-                classPathSegments.insertElementAt(uri.getPath(), 0);
-            } catch (URISyntaxException e) {
-            }
-        }
-
         String[] classList = (String[])
             java.security.AccessController.doPrivileged(
                                     new java.security.PrivilegedAction() {