-
Bug
-
Resolution: Fixed
-
P3
-
7u40
-
b01
-
x86
-
windows
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8000105 | 8 | Chris Bensen | P3 | Resolved | Fixed | b58 |
java.lang.NullPointerException
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(AbstractAutoProxyHandler.java:168)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(AbstractAutoProxyHandler.java:135)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(DynamicProxyManager.java:338)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(DeployProxySelector.java:58)
at com.sun.javaws.Main.initializeExecutionEnvironment(Main.java:1310)
at com.sun.javaws.Main.continueInSecureThread(Main.java:248)
at com.sun.javaws.Main.access$000(Main.java:61)
at com.sun.javaws.Main$1.run(Main.java:160)
at java.lang.Thread.run(Thread.java:722)
When the proxy file is specified but does not exist. I don't know how to reproduce this in the wild, but here is a test case:
public void testInvalidProxyFile() throws Exception {
SetupHelpers.setupServices();
server = WebServer.startServer(port, null, false);
proxyInfo = new BrowserProxyInfo();
serverName = "http://localhost:%d";
// test.pac is an invalid proxy file.
proxyFileName = getServerName() + "/test.pac";
proxyInfo.setAutoConfigURL(proxyFileName);
proxyInfo.setType(ProxyType.AUTO);
proxyHandler = createProxyHandlerForPlatform();
try {
proxyHandler.init(proxyInfo);
ProxyInfo pi[] = proxyHandler.getProxyInfo(
new URL("http://callalert.some.domain/hello.jar"));
assertEquals("Expect list of 2 proxies", 2, pi.length);
}
catch (NullPointerException e) {
fail("Failed to initialize proxy handler");
}
}
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.isSupportedINSFile(AbstractAutoProxyHandler.java:168)
at com.sun.deploy.net.proxy.AbstractAutoProxyHandler.init(AbstractAutoProxyHandler.java:135)
at com.sun.deploy.net.proxy.DynamicProxyManager.reset(DynamicProxyManager.java:338)
at com.sun.deploy.net.proxy.DeployProxySelector.reset(DeployProxySelector.java:58)
at com.sun.javaws.Main.initializeExecutionEnvironment(Main.java:1310)
at com.sun.javaws.Main.continueInSecureThread(Main.java:248)
at com.sun.javaws.Main.access$000(Main.java:61)
at com.sun.javaws.Main$1.run(Main.java:160)
at java.lang.Thread.run(Thread.java:722)
When the proxy file is specified but does not exist. I don't know how to reproduce this in the wild, but here is a test case:
public void testInvalidProxyFile() throws Exception {
SetupHelpers.setupServices();
server = WebServer.startServer(port, null, false);
proxyInfo = new BrowserProxyInfo();
serverName = "http://localhost:%d";
// test.pac is an invalid proxy file.
proxyFileName = getServerName() + "/test.pac";
proxyInfo.setAutoConfigURL(proxyFileName);
proxyInfo.setType(ProxyType.AUTO);
proxyHandler = createProxyHandlerForPlatform();
try {
proxyHandler.init(proxyInfo);
ProxyInfo pi[] = proxyHandler.getProxyInfo(
new URL("http://callalert.some.domain/hello.jar"));
assertEquals("Expect list of 2 proxies", 2, pi.length);
}
catch (NullPointerException e) {
fail("Failed to initialize proxy handler");
}
}
- backported by
-
JDK-8000105 NullPointerException when proxy file is invalid
- Resolved