Skip to content

Commit

Permalink
Fix PID-based JVM matching.
Browse files Browse the repository at this point in the history
Stupid thinko in the code, which wasn't returning the matching JVM.

Change-Id: I10aa009acb53a343a3b86812d19ce21228a462b4
  • Loading branch information
tsuna committed Dec 22, 2010
1 parent a6f94c1 commit 018774d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stumbleupon/monitoring/jmx.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,10 @@ private static JVM selectJVM(final String selector,
throw new IllegalArgumentException("Invalid PID: " + pid);
}
final JVM jvm = vms.get(pid);
if (jvm == null) {
error = "Couldn't find a JVM with PID " + pid;
if (jvm != null) {
return jvm;
}
error = "Couldn't find a JVM with PID " + pid;
} catch (NumberFormatException e) {
/* Ignore. */
}
Expand Down

0 comments on commit 018774d

Please sign in to comment.