jmx-dev RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v23]

Mandy Chung mchung at openjdk.org
Thu May 25 16:42:06 UTC 2023


On Wed, 24 May 2023 16:50:59 GMT, Paul Hohensee <phh at openjdk.org> wrote:

>> test/jdk/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java line 160:
>> 
>>> 158:         try {
>>> 159:             curThread.join();
>>> 160:         } catch (InterruptedException e) {
>> 
>> should it just let `InterruptedException` be thrown rather than swallowing it?  This pattern appears multiple places in this test and ThreadAllocatedMemoryArray.java test.
>
> The original implementation grabbed this code from, e.g., test/jdk/java/lang/management/ThreadMXBean/ThreadUserTime.java. In the latter, InterruptedException causes the test to fail, but for some reason now lost, ThreadAllocatedMemory.java doesn't do that, but ThreadAllocatedMemoryArray.java does.

Since you are on this file, it may be good to clean them up.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1205773318


More information about the jmx-dev mailing list