Sv: typo in JConsole's MemoryPoolStat.getAfterGcUsage()
Erik Gahlin
erik.gahlin at oracle.com
Sat May 5 05:55:21 PDT 2012
Hi,
I noticed the same thing when I was going through the code yesterday, fixing localization issues.
I changed it to afterGcUsage, but I haven't tested or checked in the code in yet
- Erik
Hi all,
I've found a typo in JConsole's MemoryPoolStat.getAfterGcUsage(), which is returning the wrong field. Here's a patch to fix it:
diff -r 9e82ac15ab80 src/share/classes/sun/tools/jconsole/MemoryPoolStat.java
--- a/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java Thu Apr 26 14:07:12 2012 -0700
+++ b/src/share/classes/sun/tools/jconsole/MemoryPoolStat.java Sat May 05 16:33:46 2012 +0800
@@ -129,6 +129,6 @@
* null if no GC occurs.
*/
public MemoryUsage getAfterGcUsage() {
- return beforeGcUsage;
+ return afterGcUsage;
}
}
In addition, I searched "MemoryPoolStat" in JConsole's source code, and I got a method "getStat" in
"src/share/classes/sun/tools/jconsole/MemoryPoolProxy.java", which could generate an MemoryPoolStat object. But when searching
"getStat", I got nothing. So my question is that, have class MemoryPoolStat not been used yet, or dose it be used in other jar?
Thanks,
caoxudong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20120505/aea95bcb/attachment.html
More information about the serviceability-dev
mailing list