8057776: Misc cleanups of the attach code
Reviewed-by: alanb, dfuchs, jbachorik
This commit is contained in:
parent
5e87931875
commit
13a51887f7
@ -27,8 +27,6 @@ package sun.tools.attach;
|
||||
import com.sun.tools.attach.VirtualMachine;
|
||||
import com.sun.tools.attach.VirtualMachineDescriptor;
|
||||
import com.sun.tools.attach.AttachNotSupportedException;
|
||||
import com.sun.tools.attach.spi.AttachProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/*
|
||||
@ -37,9 +35,6 @@ import java.io.IOException;
|
||||
*/
|
||||
public class AttachProviderImpl extends HotSpotAttachProvider {
|
||||
|
||||
// perf counter for the JVM version
|
||||
private static final String JVM_VERSION = "java.property.java.vm.version";
|
||||
|
||||
public AttachProviderImpl() {
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,6 @@ package sun.tools.attach;
|
||||
import com.sun.tools.attach.VirtualMachine;
|
||||
import com.sun.tools.attach.VirtualMachineDescriptor;
|
||||
import com.sun.tools.attach.AttachNotSupportedException;
|
||||
import com.sun.tools.attach.spi.AttachProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/*
|
||||
@ -37,9 +35,6 @@ import java.io.IOException;
|
||||
*/
|
||||
public class AttachProviderImpl extends HotSpotAttachProvider {
|
||||
|
||||
// perf counter for the JVM version
|
||||
private static final String JVM_VERSION = "java.property.java.vm.version";
|
||||
|
||||
public AttachProviderImpl() {
|
||||
}
|
||||
|
||||
|
@ -636,7 +636,7 @@ public abstract class VirtualMachine {
|
||||
* @throws NullPointerException
|
||||
* If agentProperties is null.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 1.8
|
||||
*/
|
||||
public abstract void startManagementAgent(Properties agentProperties) throws IOException;
|
||||
|
||||
@ -662,7 +662,7 @@ public abstract class VirtualMachine {
|
||||
* that cannot be identified as an error to indicate that the
|
||||
* operation failed in the target VM.
|
||||
*
|
||||
* @since 1.9
|
||||
* @since 1.8
|
||||
*/
|
||||
public abstract String startLocalManagementAgent() throws IOException;
|
||||
|
||||
|
@ -25,34 +25,25 @@
|
||||
package sun.tools.attach;
|
||||
|
||||
import com.sun.tools.attach.VirtualMachineDescriptor;
|
||||
import com.sun.tools.attach.VirtualMachine;
|
||||
import com.sun.tools.attach.AttachPermission;
|
||||
import com.sun.tools.attach.AttachNotSupportedException;
|
||||
import com.sun.tools.attach.spi.AttachProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Iterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import sun.jvmstat.monitor.HostIdentifier;
|
||||
import sun.jvmstat.monitor.Monitor;
|
||||
import sun.jvmstat.monitor.MonitoredHost;
|
||||
import sun.jvmstat.monitor.MonitoredVm;
|
||||
import sun.jvmstat.monitor.MonitoredVmUtil;
|
||||
import sun.jvmstat.monitor.VmIdentifier;
|
||||
import sun.jvmstat.monitor.MonitorException;
|
||||
|
||||
/*
|
||||
* Platform specific provider implementations extend this
|
||||
*/
|
||||
public abstract class HotSpotAttachProvider extends AttachProvider {
|
||||
|
||||
// perf count name for the JVM version
|
||||
private static final String JVM_VERSION = "java.property.java.vm.version";
|
||||
|
||||
public HotSpotAttachProvider() {
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ package sun.tools.attach;
|
||||
import com.sun.tools.attach.VirtualMachine;
|
||||
import com.sun.tools.attach.VirtualMachineDescriptor;
|
||||
import com.sun.tools.attach.AttachNotSupportedException;
|
||||
import com.sun.tools.attach.spi.AttachProvider;
|
||||
import java.io.IOException;
|
||||
|
||||
/*
|
||||
|
@ -115,8 +115,7 @@ public class JMXStartStopTest {
|
||||
throws Exception {
|
||||
|
||||
Set<ObjectName> names = server.queryNames(pattern,query);
|
||||
for (Iterator<ObjectName> i = names.iterator(); i.hasNext(); ) {
|
||||
ObjectName name = (ObjectName)i.next();
|
||||
for (ObjectName name : names) {
|
||||
MBeanInfo info = server.getMBeanInfo(name);
|
||||
dbg_print("Got MBean: " + name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user