code: @SuppressWarnings("unused")
      private static MBeanServerConnection getServerConnection(int pid) {
  
          try {
              JMXServiceURL serviceURL = new JMXServiceURL(connectorAddress(pid));
              return JMXConnectorFactory.connect(serviceURL).getMBeanServerConnection();
          } catch (MalformedURLException ex) {
              throw failed("JMX connection failed", ex);
          } catch (IOException ex) {
              throw failed("JMX connection failed", ex);
          }
  
      }
docs: This has to be called by reflection so it can as well be private to stress this is not an API