Re: Review Request for 8163261: regression on Linux: java/awt/LightweightDispatcher/LWDispatcherMemoryLeakTest.java

2016-08-17 Thread Alexandr Scherbatiy

On 8/15/2016 12:43 PM, Ambarish Rapte wrote:


Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-8163261

Webrev: 
http://cr.openjdk.java.net/~arapte/8163261/webrev.00/ 



Issue:

Reference to JButton was not getting collected by GC.

Cause:

A strong reference to objects was held by 
PainterMultiResolutionCachedImage.


And the image reference was held by HashMap.

Fix:

Changing the HashMap to WeakHashMap. Entry to 
WeakHashMap gets removed after the object has no other strong reference.


May be using the soft reference would be better in this case. It 
could be expensive to recreate a cache with images every time GC removed 
them.


  Thanks,
  Alexandr.


Regards,

Ambarish





Re: Review Request for 8163261: regression on Linux: java/awt/LightweightDispatcher/LWDispatcherMemoryLeakTest.java

2016-08-17 Thread Rajeev Chamyal
Hello Amarish,

Can you add this bug id to existing regression test case.

Regards,
Rajeev Chamyal
> On 15-Aug-2016, at 3:13 PM, Ambarish Rapte  wrote:
> 
> Hi,
> Please review fix for JDK9,
> Bug: https://bugs.openjdk.java.net/browse/JDK-8163261 
> 
> Webrev: http://cr.openjdk.java.net/~arapte/8163261/webrev.00/ 
> 
>  
> Issue:
> Reference to JButton was not getting collected by GC.
>  
> Cause:
> A strong reference to objects was held by 
> PainterMultiResolutionCachedImage.
> And the image reference was held by HashMap.
>  
> Fix:
> Changing the HashMap to WeakHashMap. Entry to WeakHashMap 
> gets removed after the object has no other strong reference.
>  
>  
>  
> Regards,
> Ambarish



Re: 8163169: [PIT][TEST_BUG] fix to JDK-8161470 doesn't work

2016-08-17 Thread Rajeev Chamyal
Looks ok to me.

 

Regards,

Rajeev Chamyal

 

From: Alexandr Scherbatiy 
Sent: 17 August 2016 12:26
To: Avik Niyogi; Rajeev Chamyal; swing-dev@openjdk.java.net
Subject: Re:  8163169: [PIT][TEST_BUG] fix to JDK-8161470 doesn't 
work

 

The fix looks good to me.

Thanks,
Alexandr.

On 8/17/2016 9:48 AM, Avik Niyogi wrote:

Hi All,

 

Kindly review the fix for JDK9. 

 

Bug: https://bugs.openjdk.java.net/browse/JDK-8163169

 

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Eaniyogi/8163169/webrev.00/"http://cr.openjdk.java.net/~aniyogi/8163169/webrev.00/

 

Issue: The test javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java 
fails on OS X

 for PIT machines even though it works fine for local machine.

 

Cause:  As pointed out, this is an issue with the robot autoDelay.

 

Fix: Appropriate Robot methods were used to fix this with enough delays added 
to work on PIT machines.

 

With Regards,

Avik Niyogi

 


8163169: [PIT][TEST_BUG] fix to JDK-8161470 doesn't work

2016-08-17 Thread Avik Niyogi
Hi All,

Kindly review the fix for JDK9.

Bug: https://bugs.openjdk.java.net/browse/JDK-8163169 


Webrev: http://cr.openjdk.java.net/~aniyogi/8163169/webrev.00/ 


Issue: The test javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java 
fails on OS X
 for PIT machines even though it works fine for local machine.

Cause:  As pointed out, this is an issue with the robot autoDelay.

Fix: Appropriate Robot methods were used to fix this with enough delays added 
to work on PIT machines.

With Regards,
Avik Niyogi