Patch review request - Test bug 7123972 test/java/lang/annotation/loaderLeak/Main.java fails intermittently (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Thu Jun 21 10🔞34 UTC 2012
- Previous message: Patch review request - Test bug 7123972 test/java/lang/annotation/loaderLeak/Main.java fails intermittently
- Next message: RFR [JDK8]: 7169894: JAXP Plugability Layer: using service loader
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 21/06/2012 07:05, Eric Wang wrote:
Hi All,
I come from Java SQE team who are interested in regression test bug fix. Here is the first simple fix for bug 7123972 <http://monaco.us.oracle.com/detail.jsf?cr=7123972>, Can you please help to review and comment? Attachment is the patch Thanks! This bug is caused by wrong assumption that the GC is started immediately to recycle un-referenced objects after System.gc() called one or two times. The proposed solution is to make sure the un-referenced object is recycled by GC before checking if the reference is null. Regards, Eric You should also remove the test from the exclude list (jdk/test/ProblemList.txt) so that it will be run again.
Otherwise the change looks okay to me. I agree with David's comments that you could invoke runFinalization. I would also suggest increasing the sleep time from 5ms so that it's not spinning calling System.gc. A minor comment is that "while(false==GCIndicator)" looks a bit odd, maybe rename the flag to "finalized" and change it to "while (!finalized) { ... }".
-Alan.
- Previous message: Patch review request - Test bug 7123972 test/java/lang/annotation/loaderLeak/Main.java fails intermittently
- Next message: RFR [JDK8]: 7169894: JAXP Plugability Layer: using service loader
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]