changeset 10979:e9cc780faafd

8065096: java.net.Authenticator.theAuthenticator should be properly synchronized Reviewed-by: chegar, lancea
author shade
date Mon, 17 Nov 2014 15:30:22 +0300
parents 224bb8a9297b
children 7c1797994c29 17e14f62e34b
files src/java.base/share/classes/java/net/Authenticator.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/net/Authenticator.java	Mon Nov 17 14:50:05 2014 +0300
+++ b/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;