RFR 8210300: runtime/MemberName/MemberNameLeak.java fails with RuntimeException

Patricio Chilano patricio.chilano.mateo at oracle.com
Tue Sep 11 17:17:03 UTC 2018

Hi David,

On 9/10/18 9:31 PM, David Holmes wrote:
> Hi Patricio,
> On 10/09/2018 11:57 PM, Patricio Chilano wrote:
>> Hi all,
>> Could you review this small fix to tests CleanProtectionDomain.java 
>> and MemberNameLeak.java?
>> It adds flag UnlockDiagnosticVMOptions needed in product builds. It 
>> also calls System.gc() periodically to avoid relaying on a single 
>> call, and adds a short sleep between polls.
> Functionally looks fine. Any particular reason for the 3 second GC delay?

Not really, I saw some tests waiting a couple of seconds before calling 
System.gc() again. The idea was also to give enough time for the service 
thread to run, although this particular delay might not be the ideal one.

> Style-wise other than what Dan pointed out, it's preferred to always 
> use braces with if-statements and use multiple lines ie:
> if (x) {
>   f();
> }
> rather than:
> if (x) f();
Ok, I'll make that change.
> No need for updated webrev if you change.

Thanks for the review David!

> Thanks,
> David
>> Bug URL: https://bugs.openjdk.java.net/browse/JDK-8210300
>> Webrev URL: http://cr.openjdk.java.net/~pchilanomate/8210300.01/webrev
>> Thanks,
>> Patricio

More information about the hotspot-runtime-dev mailing list