8150521: SharedSecrets.getJavaNetInetAddressAccess should ensure that InetAddress is initialised
authorvtewari
Thu, 03 Mar 2016 17:27:35 +0000
changeset 36229 ceb026e2731f
parent 36228 a16a22218e23
child 36230 ffcbf28059ee
8150521: SharedSecrets.getJavaNetInetAddressAccess should ensure that InetAddress is initialised Reviewed-by: alanb, chegar
jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Mar 03 17:21:08 2016 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Mar 03 17:27:35 2016 +0000
@@ -118,6 +118,8 @@
     }
 
     public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
+        if (javaNetInetAddressAccess == null)
+            unsafe.ensureClassInitialized(java.net.InetAddress.class);
         return javaNetInetAddressAccess;
     }