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

Print this page

        

@@ -34,10 +34,13 @@
 import javax.management.ObjectName;
 import javax.management.RuntimeOperationsException;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+
+import jdk.internal.misc.JavaNioAccess;
+import jdk.internal.misc.SharedSecrets;
 import sun.util.logging.LoggingSupport;
 import java.util.ArrayList;
 import java.util.List;
 
 /**

@@ -206,11 +209,11 @@
 
     private static List<BufferPoolMXBean> bufferPools = null;
     public static synchronized List<BufferPoolMXBean> getBufferPoolMXBeans() {
         if (bufferPools == null) {
             bufferPools = new ArrayList<>(2);
-            bufferPools.add(createBufferPoolMXBean(sun.misc.SharedSecrets.getJavaNioAccess()
+            bufferPools.add(createBufferPoolMXBean(SharedSecrets.getJavaNioAccess()
                 .getDirectBufferPool()));
             bufferPools.add(createBufferPoolMXBean(sun.nio.ch.FileChannelImpl
                 .getMappedBufferPool()));
         }
         return bufferPools;

@@ -220,11 +223,11 @@
 
     /**
      * Creates management interface for the given buffer pool.
      */
     private static BufferPoolMXBean
-        createBufferPoolMXBean(final sun.misc.JavaNioAccess.BufferPool pool)
+        createBufferPoolMXBean(final JavaNioAccess.BufferPool pool)
     {
         return new BufferPoolMXBean() {
             private volatile ObjectName objname;  // created lazily
             @Override
             public ObjectName getObjectName() {