<AWT Dev> [9] Review Request: 8043393 NullPointerException and no event received when clipboard data flavor changes

Anton V. Tarasov anton.tarasov at oracle.com
Tue Feb 24 16:16:32 UTC 2015


On 24.02.2015 19:10, Sergey Bylokhov wrote:
> On 24.02.2015 18:49, Anton V. Tarasov wrote:
>> Hi Sergey,
>>
>> I suppose formatArrayAsDataFlavorSet() didn't produce any meaningful side effect currently not 
>> taken into account?
> Seems yes, other than some default initialization if it was not called before.

Ok, provided that the default initialization doesn't play a part here...

Anton.

>
>> If so, I'm fine with the change.
>>
>> Regards,
>> Anton.
>>
>> On 24.02.2015 15:20, Sergey Bylokhov wrote:
>>> Hello.
>>> Please review a fix for jdk 9.
>>> The NPE occurs, because we call getDefaultFlavorMap() on the Toolkit thread 
>>> (formatArrayAsDataFlavorSet->getDefaultFlavorTable->SystemFlavorMap.getDefaultFlavorMap()).
>>> But after the fix of JDK-8030679 a DefaultFlavorMap is stored per AppContext, so we cannot use 
>>> it on the TK thread. As a fix I suggest to store raw formats instead of Set<DataFlavor>.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8043393
>>> Webrev can be found at: http://cr.openjdk.java.net/~serb/8043393/webrev.00
>>>
>>
>
>



More information about the awt-dev mailing list