escape colon in process ObjectName

This commit is contained in:
Doug MacEachern 2011-04-08 10:25:05 -07:00
parent 833ca18ecf
commit f2aef38d02
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class SigarProcess implements SigarProcessMBean {
public String getObjectName() throws SigarException { public String getObjectName() throws SigarException {
long pid = getPid(); long pid = getPid();
String name = this.sigar.getProcState(pid).getName(); String name = this.sigar.getProcState(pid).getName().replaceAll(":", "_");
String cls = "unknown"; String cls = "unknown";
if (name.startsWith("java")) { if (name.startsWith("java")) {
try { try {