src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
changeset 51398 3c389a284345
parent 47216 71c04702a3d5
child 58611 53ddf218eddd
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Tue Aug 14 14:28:23 2018 +0200
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Tue Aug 14 22:39:34 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  */
 package sun.security.krb5.internal.ccache;
 
+import sun.security.action.GetPropertyAction;
 import sun.security.krb5.*;
 import sun.security.krb5.internal.*;
 import java.util.StringTokenizer;
@@ -381,9 +382,7 @@
         }
 
         // get cache name from system.property
-        String osname =
-            java.security.AccessController.doPrivileged(
-                        new sun.security.action.GetPropertyAction("os.name"));
+        String osname = GetPropertyAction.privilegedGetProperty("os.name");
 
         /*
          * For Unix platforms we use the default cache name to be
@@ -417,18 +416,12 @@
 
         // we did not get the uid;
 
-        String user_name =
-            java.security.AccessController.doPrivileged(
-                        new sun.security.action.GetPropertyAction("user.name"));
+        String user_name = GetPropertyAction.privilegedGetProperty("user.name");
 
-        String user_home =
-            java.security.AccessController.doPrivileged(
-                        new sun.security.action.GetPropertyAction("user.home"));
+        String user_home = GetPropertyAction.privilegedGetProperty("user.home");
 
         if (user_home == null) {
-            user_home =
-                java.security.AccessController.doPrivileged(
-                        new sun.security.action.GetPropertyAction("user.dir"));
+            user_home = GetPropertyAction.privilegedGetProperty("user.dir");
         }
 
         if (user_name != null) {