8065096: java.net.Authenticator.theAuthenticator should be properly synchronized
authorshade
Mon, 17 Nov 2014 15:30:22 +0300
changeset 27728 cbde148d040c
parent 27727 ac74c0c65910
child 27729 d6a975391991
child 27769 d5c53b177f54
8065096: java.net.Authenticator.theAuthenticator should be properly synchronized Reviewed-by: chegar, lancea
jdk/src/java.base/share/classes/java/net/Authenticator.java
--- a/jdk/src/java.base/share/classes/java/net/Authenticator.java	Mon Nov 17 14:50:05 2014 +0300
+++ b/jdk/src/java.base/share/classes/java/net/Authenticator.java	Mon Nov 17 15:30:22 2014 +0300
@@ -60,7 +60,7 @@
 class Authenticator {
 
     // The system-wide authenticator object.  See setDefault().
-    private static Authenticator theAuthenticator;
+    private static volatile Authenticator theAuthenticator;
 
     private String requestingHost;
     private InetAddress requestingSite;