<AWT Dev> <AWT dev>[9] Review request for JDK-8156099: [macosx] Drag and drop of link from web browser, DataFlavor types application/x-java-url and text/uri-list, getTransferData returns null
Hendrik Schreiber
hs at tagtraum.com
Mon Aug 29 10:30:14 UTC 2016
A little late, but in the fix for CDataTransferer.java
charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), "UTF-8”);
should probably be
import java.nio.charset.StandardCharsets;
[...]
charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), StandardCharsets.UTF_8);
to avoid the unnecessary charset lookup. And I know, this is only a minor detail and does not make a big diff. Just trying to improve the codebase.
I’m grateful this has finally been addressed and am very much looking forward to the backport to JDK8!
Cheers,
-hendrik
> On Aug 20, 2016, at 13:11, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
>
> +1
>
> On 18.08.16 14:55, Manajit Halder wrote:
>> Hi Sergey,
>>
>> Thank you for the review. I have modified the code as per your comment.
>> http://cr.openjdk.java.net/~mhalder/8156099/webrev.02/
>>
>> Thanks,
>> Manajit
>>
>>> On 18-Aug-2016, at 2:58 pm, Sergey Bylokhov
>>> <Sergey.Bylokhov at oracle.com <mailto:Sergey.Bylokhov at oracle.com>> wrote:
>>>
>>> Looks fine.
>>> please change the title of the frame to some text related to this fix,
>>> instead of "Updating TrayIcon Popup Menu Item Test"
>>>
>>> On 14.08.16 23:50, Manajit Halder wrote:
>>>> Hi Sergey,
>>>>
>>>> Thank you for your review comments.
>>>>
>>>> I have modified the code as per your first two comments.
>>>> For the last comment the fix was tested with JDK versions b123, b124,
>>>> b125, b127 and b130 and
>>>> the test failed with the popup message.
>>>>
>>>> Please review the modified review.
>>>> http://cr.openjdk.java.net/~mhalder/8156099/webrev.01/
>>>>
>>>> Thanks,
>>>> Manajit
>>>>
>>>>> On 09-Aug-2016, at 9:41 pm, Sergey Bylokhov
>>>>> <Sergey.Bylokhov at oracle.com
>>>>> <mailto:Sergey.Bylokhov at oracle.com> <mailto:Sergey.Bylokhov at oracle.com>>
>>>>> wrote:
>>>>>
>>>>> Hi, Manajit.
>>>>> - Its seems that the test creates the Swing components on non-EDT.
>>>>> - The instructions are a little bit misleading, because popup will be
>>>>> shown even when the test is passed.
>>>>> - When I run the test on the current client ws, it is passed. Can you
>>>>> please double check that the test fails before the fix.
>>>>>
>>>>> On 01.08.16 12:35, Manajit Halder wrote:
>>>>>> Hi All,
>>>>>>
>>>>>> Kindly review the fix for JDK9.
>>>>>>
>>>>>> Bug:
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8156099
>>>>>>
>>>>>> Webrev:
>>>>>> http://cr.openjdk.java.net/~mhalder/8156099/webrev.00/
>>>>>>
>>>>>> Issue:
>>>>>> [macosx] Drag and drop of link from web browser, DataFlavor types
>>>>>> application/x-java-url and text/uri-list, getTransferData returns null
>>>>>>
>>>>>> Cause:
>>>>>> This issue is a regression of issue
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8136763.
>>>>>> While adding fix to 8136763 code was modified to handle coping of
>>>>>> multiple files but proper distinction was not added between bytes
>>>>>> containing files and urls.
>>>>>>
>>>>>> Fix:
>>>>>> Fixed by comparing format of the bytes received for dataflavor
>>>>>> "mimetype=text/uri-list".
>>>>>> Fixed by distinguishing between bytes containing files and urls. In
>>>>>> both
>>>>>> cases the dataflavor contains same “mimetype=text/uri-list”, but the
>>>>>> format is different.
>>>>>> Format CF_FILE is only used in case of bytes containing files.
>>>>>>
>>>>>> Regards,
>>>>>> Manajit
>>>>>
>>>>>
>>>>> --
>>>>> Best regards, Sergey.
>>>>
>>>
>>>
>>> --
>>> Best regards, Sergey.
>>
>
>
> --
> Best regards, Sergey.
More information about the awt-dev
mailing list