[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [9] Fix for JDK-8160421 : Regression: JDK-8139192 causes NPE in java.awt.Toolki
From:       Jim Graham <james.graham () oracle ! com>
Date:       2016-06-30 23:43:17
Message-ID: 5775AE95.5070302 () oracle ! com
[Download RAW message or body]

The solution looks fine to me.

I didn't run the test case, but about the only issue I can see with it 
is whether it should have a flag to run it in its own VM because of its 
interaction with System.err.  Phil?

			...jim

On 06/30/2016 06:41 AM, Ajit Ghaisas wrote:
> Hi,
> 
> Bug :
> This is regarding a NPE getting printed as stacktrace in \
> java.awt.Toolkit.createCustomCursor() method. The bug is described at : \
> https://bugs.openjdk.java.net/browse/JDK-8160421 
> Root Cause :
> Fix of bug JDK-8139192 : Custom ImageFilters return blank images in Java 8(.45) \
> while working in 7. The above fix added a RuntimeException catch & log mechanism to \
> support a ImageFilter which was broken due to the second imageComplete() call in \
> OffScreenImageSource.produce() method. 
> Analysis:
> Without the fix of JDK-8139192, java.awt.Toolkit.createCustomCursor() call results \
> in NullPointerException when imageComplete(ImageConsumer.STATICIMAGEDONE) call is \
> made - but, it gets consumed silently. Cathing RuntimeException() out of \
> imageComplete(ImageConsumer.STATICIMAGEDONE) was added to fix JDK-8160421. This \
> started catching & logging the exception in case 'theConsumer' has unregistered \
> itself as a result of call \
> theConsumer.imageComplete(ImageConsumer.SINGLEFRAMEDONE); This log is undesirable \
> as this mechanism is used in java.awt.Toolkit.createCustomCursor() and may be in \
> other places. 
> Fix :
> Make the call to imageComplete(ImageConsumer.STATICIMAGEDONE) only if 'theConsumer' \
> has not been unregistered. 
> Webrev:
> http://cr.openjdk.java.net/~aghaisas/8160421/webrev.00/
> 
> Request you to review.
> 
> Regards,
> Ajit
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic