src/share/classes/sun/management/VMManagementImpl.java

Print this page

        

@@ -35,11 +35,10 @@
 import java.util.List;
 import java.util.Arrays;
 import java.util.Collections;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import sun.security.action.GetPropertyAction;
 
 /**
  * Implementation of VMManagement interface that accesses the management
  * attributes and operations locally within the same Java virtual
  * machine.

@@ -171,14 +170,12 @@
     public String   getLibraryPath()  {
         return System.getProperty("java.library.path");
     }
 
     public String   getBootClassPath( ) {
-        PrivilegedAction<String> pa
-            = new GetPropertyAction("sun.boot.class.path");
-        String result =  AccessController.doPrivileged(pa);
-        return result;
+        return AccessController.doPrivileged(
+            (PrivilegedAction<String>) () -> System.getProperty("sun.boot.class.path"));
     }
 
     public long getUptime() {
         return getUptime0();
     }