<AWT Dev> [8] Review Request: JDK-8024163 [macosx] NullPointerException at javax.swing.TransferHandler$DropHandler.handleDrag since jdk8b93, 7u40b28

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Sep 25 04:43:56 PDT 2013


Hi, Petr.
The fix looks good but I suggest to reuse 
eventSource.getLocationOnScreen() in the isEventInsideTargetsince it 
heavyweight method.

On 25.09.2013 15:05, Petr Pchelko wrote:
> Hello, AWT Team.
>
> Please review the updated version of this fix.
> It's available at: http://cr.openjdk.java.net/~pchelko/8024163/webrev.01/
>
> I have changed the dragExit events generation a bit and added a couple of tests.
>
> With best regards. Petr.
>
> On Sep 24, 2013, at 6:30 PM, Petr Pchelko <petr.pchelko at oracle.com> wrote:
>
>> Hello, AWT Team.
>>
>> Please review the fix for the following issue:
>> https://bugs.openjdk.java.net/browse/JDK-8024163
>> The fix is available here:
>> http://cr.openjdk.java.net/~pchelko/8024163/webrev.00/
>>
>> The problem is with the DropTarget Enter/Exit events. For real heavyweights they are generated by native code. For lightweights - in shared code. But for AWT components they should be generated in CDropTargetContextPeer.
>> Before the fix these events could be generated incorrectly: sometimes duplicated events were sent (this broke autoscrolling) and sometimes events were not sent at all - this caused NPEs in the shared code.
>> The insideTarget boolean was replaced by a reference to DropTarget to handle nested components correctly.
>>
>> Tested on Mac OS X (no shared code affected).
>> No new regression test failures.
>>
>> With best regards. Petr.
>>
>>


-- 
Best regards, Sergey.



More information about the awt-dev mailing list