RFR: 8328185: Convert java/awt/image/MemoryLeakTest/MemoryLeakTest.java applet test to main [v2]

Damon Nguyen dnguyen at openjdk.org
Mon Mar 18 18:37:39 UTC 2024


On Mon, 18 Mar 2024 18:16:52 GMT, Alexander Zvegintsev <azvegint at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove unneeded Global var. Review comments
>
> test/jdk/java/awt/image/MemoryLeakTest/MemoryLeakTest.java line 42:
> 
>> 40: //  static boolean testPassed = false;
>> 41: //    static Thread mainThread = null;
>> 42: //}
> 
> Shouldn't this be removed?

Thanks! Missed this when testing the behavior of the change.

> test/jdk/java/awt/image/MemoryLeakTest/MemoryLeakTest.java line 74:
> 
>> 72:         if (mainThread != null) {
>> 73:             mainThread.interrupt();
>> 74:         }
> 
> It is still unclear why we still need this. It seems to be a remnant of the old TestDialog machinery.

I initially thought this may be needed, but looks like you're right. Removed, thanks for the help!

> test/jdk/java/awt/image/MemoryLeakTest/MemoryLeakTest.java line 122:
> 
>> 120: 
>> 121:     public void componentShown(ComponentEvent e)
>> 122:     {
> 
> Suggestion:
> 
>     public void componentShown(ComponentEvent e) {
> 
> for the consistency with other code

Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18307#discussion_r1529061170
PR Review Comment: https://git.openjdk.org/jdk/pull/18307#discussion_r1529061895
PR Review Comment: https://git.openjdk.org/jdk/pull/18307#discussion_r1529060923


More information about the client-libs-dev mailing list