<AWT Dev> [9] Review Request: 8041654 OutOfMemoryError: RepainManager doesn't clean up cache of volatile images

Anton V. Tarasov anton.tarasov at oracle.com
Fri May 22 08:01:37 UTC 2015

Hi Sergey,

The fix looks fine to me. However, I don't clearly understand what did you mean by these comments?

1689         // Empty non private constructor was added because access to this
1690         // class shouldn't be emulated by a synthetic accessor method.
1691         DisplayChangedHandler() {
1692             super();
1693         }

I would expect something like "we need to be able to instantiate the class", but why you refer to 

Also, do you think the super() call is necessary here?


On 21.05.2015 15:11, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk9.
> RepainManager adds a listener to the SGE.DisplayChangedListener() and it don't hold a strong 
> reference to this listener. The problem is that SGE holds a listeners in the WeakHashMap so 
> sometimes the listeners can be cleared before they are called. Same issue exists in XToolkit.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8041654
> Webrev can be found at: http://cr.openjdk.java.net/~serb/8041654/webrev.02

More information about the awt-dev mailing list