8066131: Update java/nio/charset/Charset/NIOCharsetAvailabilityTest.java to eliminate dependency on sun.misc.Launcher
Reviewed-by: alanb
This commit is contained in:
parent
cec929efaf
commit
65904e6ad1
@ -31,10 +31,6 @@ import java.io.File;
|
||||
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.Set;
|
||||
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 @@ public class NIOCharsetAvailabilityTest {
|
||||
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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user