Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8251361: Potential race between Logger configuration and GCs in HttpURLConWithProxy test #208

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -45,17 +45,21 @@

public class HttpURLConWithProxy {

private static Logger logger =
Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection");

public static void main(String... arg) {
// Remove the default nonProxyHosts to use localhost for testing
System.setProperty("http.nonProxyHosts", "");

System.setProperty("http.proxyHost", "1.1.1.1");
System.setProperty("http.proxyPort", "1111");
String HTTPLOG = "sun.net.www.protocol.http.HttpURLConnection";
Logger.getLogger(HTTPLOG).setLevel(Level.ALL);

// Use the logger to help verify the Proxy was used
logger.setLevel(Level.ALL);
Handler h = new ProxyHandler();
h.setLevel(Level.ALL);
Logger.getLogger(HTTPLOG).addHandler(h);
logger.addHandler(h);

ServerSocket ss;
URL url;