typo in JConsole's MemoryPoolStat.getAfterGcUsage()

=?GB2312?B?stzQ8bar?= caoxudong818 at gmail.com
Sat May 5 04:05:39 PDT 2012


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/bf8c08be/attachment.html 


More information about the serviceability-dev mailing list