src/jdk.jcmd/share/classes/sun/tools/jps/Jps.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 90,121 **** errorString = " -- process information unavailable"; VmIdentifier id = new VmIdentifier(vmidString); vm = monitoredHost.getMonitoredVm(id, 0); errorString = " -- main class information unavailable"; ! output.append(" " + MonitoredVmUtil.mainClass(vm, arguments.showLongPaths())); if (arguments.showMainArgs()) { errorString = " -- main args information unavailable"; String mainArgs = MonitoredVmUtil.mainArgs(vm); if (mainArgs != null && mainArgs.length() > 0) { ! output.append(" " + mainArgs); } } if (arguments.showVmArgs()) { errorString = " -- jvm args information unavailable"; String jvmArgs = MonitoredVmUtil.jvmArgs(vm); if (jvmArgs != null && jvmArgs.length() > 0) { ! output.append(" " + jvmArgs); } } if (arguments.showVmFlags()) { errorString = " -- jvm flags information unavailable"; String jvmFlags = MonitoredVmUtil.jvmFlags(vm); if (jvmFlags != null && jvmFlags.length() > 0) { ! output.append(" " + jvmFlags); } } errorString = " -- detach failed"; monitoredHost.detach(vm); --- 90,121 ---- errorString = " -- process information unavailable"; VmIdentifier id = new VmIdentifier(vmidString); vm = monitoredHost.getMonitoredVm(id, 0); errorString = " -- main class information unavailable"; ! output.append(' ').append(MonitoredVmUtil.mainClass(vm, arguments.showLongPaths())); if (arguments.showMainArgs()) { errorString = " -- main args information unavailable"; String mainArgs = MonitoredVmUtil.mainArgs(vm); if (mainArgs != null && mainArgs.length() > 0) { ! output.append(' ').append(mainArgs); } } if (arguments.showVmArgs()) { errorString = " -- jvm args information unavailable"; String jvmArgs = MonitoredVmUtil.jvmArgs(vm); if (jvmArgs != null && jvmArgs.length() > 0) { ! output.append(' ').append(jvmArgs); } } if (arguments.showVmFlags()) { errorString = " -- jvm flags information unavailable"; String jvmFlags = MonitoredVmUtil.jvmFlags(vm); if (jvmFlags != null && jvmFlags.length() > 0) { ! output.append(' ').append(jvmFlags); } } errorString = " -- detach failed"; monitoredHost.detach(vm);