<Swing Dev> [9] Review request for 8065098 JColorChooser no longer supports drag and drop between two JVM instances
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Wed Nov 26 12:08:45 UTC 2014
On 11/24/2014 1:25 PM, Sergey Bylokhov wrote:
> Hi, Alexander.
> can you investigate why during this dnd operation
> df.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType is local?
The TransferHandler.exportAsDrag(...) method uses
PropertyTransferable class for any dragged property like color in
JColorChooser.
PropertyTransferable class always returns
"application/x-java-jvm-local-objectref" mime type for a dragged property.
It is better to investigate the dragged property mime type changing
in a separate issue to not introduce new regressions.
>
> And the test can be improved as well, since the steps are unclear:
> 1. Compile the java test JColorChooserDnDTest.java:
> 27 > javac JColorChooserDnDTest.java
> 28 2. Run the first instance of the java test:
> 29 > java JColorChooserDnDTest
> I am sure that the wrong version of the java will be used in this case.
I have updated the test description:
http://cr.openjdk.java.net/~alexsch/8065098/webrev.02/
> Is it possible to automate this test?
The fix is supposed to be backported to the JDK 8u and I am not
sure that the automated test which drags a color from one instance
of JVM to another will be stable. I would prefer to updated the
current test to automated in JDK 9 as part of the fix
JDK-8065647 [macosx] Drag and drop does not work for
JColorChooser between two JVM instances
Thanks,
Alexandr.
>
> On 21.11.2014 19:08, Alexander Scherbatiy wrote:
>> On 11/21/2014 5:41 PM, Alexey Ivanov wrote:
>>> Hi Alexandr,
>>>
>>> Although I'm not a reviewer, the fix look good to me.
>>>
>>> The fix works with JColorChooserDnDTest and does not cause
>>> ClassCastException in the test for 8024061. Yet the latter test,
>>> test/sun/awt/dnd/8024061/bug8024061.java, fails. I propose to remove
>>> the additional check that data is null, lines 280-282, from the test.
>>
>> Thank you for the review.
>> I have updated the test bug8024061:
>> http://cr.openjdk.java.net/~alexsch/8065098/webrev.01
>>
>> Thanks,
>> Alexandr.
>>
>>>
>>> Regards,
>>> Alexey
>>>
>>> On 21.11.2014 13:38, Alexandr Scherbatiy wrote:
>>>>
>>>> Hello,
>>>>
>>>> Could you review the fix:
>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8065098
>>>> webrev: http://cr.openjdk.java.net/~alexsch/8065098/webrev.00
>>>>
>>>> The issue appears after the fix 8024061 Exception thrown when
>>>> drag and drop between two components is executed quickly.
>>>> In some way the mime type of the dropped color has
>>>> javaJVMLocalObjectMimeType on the second JVM.
>>>>
>>>> The issue should be fixed in JDK 8 as the regression so the easy
>>>> safe fix that prevents ClassCastException is added.
>>>> The full fix that includes a proper synchronization between XAWT
>>>> and EDT threads on Linux can be added later.
>>>>
>>>> Thanks,
>>>> Alexandr.
>>>>
>>>
>>
>
>
More information about the swing-dev
mailing list