[8u-dev][7u-dev] Backport request for 8058473: "Comparison method violates its general contract" when using Clipboard

Seán Coffey sean.coffey at oracle.com
Fri Sep 26 11:13:49 UTC 2014


Approved for 8u-dev and 7u-dev.

regards,
Sean.

On 26/09/2014 11:28, Anton Nashatyrev wrote:
> Hello,
>
>     please approve the backport to 8u-dev and 7u-dev (the patch is 
> absolutely the same for 8u-dev and 7u-dev)
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8058473
> JDK9 changeset: 
> http://hg.openjdk.java.net/jdk9/client/jdk/rev/c87d6fdf8376
> Backport to 8u: 
> http://cr.openjdk.java.net/%7Eanashaty/8058473/8/webrev.00/
> Review thread: 
> http://mail.openjdk.java.net/pipermail/awt-dev/2014-September/008516.html
>
> Thanks!
> Anton.
>
> Hello Anton,
>
>  the backport looks fine.
>
> Thanks,
> Andrew
>
> On 9/25/2014 4:16 PM, anton nashatyrev wrote:
>> Hi Sergey, Andrew,
>>
>>     could you  please additionally review the fix backport to 8u-dev
>> (the fixed util method as been moved to another class) ?
>>
>> JDK9 fix: http://cr.openjdk.java.net/%7Eanashaty/8058473/9/webrev.00/
>> Backport to 8u:
>> http://cr.openjdk.java.net/%7Eanashaty/8058473/8/webrev.00/
>>
>> Thanks!
>> Anton.
>>
>> On 24.09.2014 18:15, Andrew Brygin wrote:
>>> Hello Anton,
>>>
>>>  the fix looks fine to me.
>>>
>>> Thanks,
>>> Andrew
>>>
>>> On 9/24/2014 1:51 PM, anton nashatyrev wrote:
>>>> Sergey, thanks for review!
>>>>
>>>> Any other volunteer?
>>>>
>>>> On 19.09.2014 17:27, Sergey Bylokhov wrote:
>>>>> Hi, Anton.
>>>>> Then the fix looks good, thanks for clarification.
>>>>>
>>>>> On 19.09.2014 17:25, anton nashatyrev wrote:
>>>>>> We don't treat the 'text/plain; class=java.lang.Object' as
>>>>>> TextType (DataFlavor.isFlavorTextType()) since it has unknown
>>>>>> representation class. Such flavors fall into 'other' category.
>>>>>>
>>>>>> On 19.09.2014 17:16, Sergey Bylokhov wrote:
>>>>>>> Hi, Anton.
>>>>>>> Why "unknown/flavor" is before "text/plain" in the fixed version?
>>>>>>>
>>>>>>> text/plain; class=java.io.Serializable; charset=unicode
>>>>>>> text/html; class=java.io.Serializable; charset=unicode
>>>>>>> unknown/flavor; class=java.io.InputStream
>>>>>>> unknown/flavor; class=java.lang.Object
>>>>>>> text/unknown; class=java.lang.Object; charset=unicode
>>>>>>> text/unknown; class=java.lang.Object
>>>>>>> text/plain; class=java.lang.Object; charset=unicode
>>>>>>> text/plain; class=java.lang.Object
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 19.09.2014 15:58, anton nashatyrev wrote:
>>>>>>>> Hi Sergey,
>>>>>>>>
>>>>>>>> On 18.09.2014 17:30, Sergey Bylokhov wrote:
>>>>>>>>>  - Can you try to change sort TimSort algorithm  to mergerSort.
>>>>>>>>> What the order will be in this case ?(see JDK-8048887).
>>>>>>>>
>>>>>>>> The mergeSort seems to be more relaxed regarding the Comparator
>>>>>>>> correctness (BTW TimSort also doesn't fail each time - this
>>>>>>>> depends on initial elements positions). The order of course is
>>>>>>>> not correct with the incorrect comparator:
>>>>>>>>
>>>>>>>>
>>>>>>>>   MergeSort with current comparator Merge/TimSort with fixed
>>>>>>>> Comparator
>>>>>>>> ---------------------------------
>>>>>>>> -----------------------------------
>>>>>>>>   application/unknown; class=java.io.InputStream
>>>>>>>> application/unknown; class=java.io.InputStream
>>>>>>>>   application/unknown; class=java.io.InputStream
>>>>>>>> application/unknown; class=java.io.InputStream
>>>>>>>>   application/unknown; class=java.lang.Object
>>>>>>>> application/unknown; class=java.lang.Object
>>>>>>>>   application/x-java-jvm-local-objectref;
>>>>>>>> class=java.io.InputStream
>>>>>>>> application/x-java-jvm-local-objectref; class=java.io.InputStream
>>>>>>>>   application/x-java-jvm-local-objectref;
>>>>>>>> class=java.io.InputStream
>>>>>>>> application/x-java-jvm-local-objectref; class=java.io.InputStream
>>>>>>>>   application/x-java-jvm-local-objectref; class=java.lang.Object
>>>>>>>> application/x-java-jvm-local-objectref; class=java.lang.Object
>>>>>>>>   text/unknown; class=java.io.Serializable;
>>>>>>>> charset=unicode            text/html; class=java.io.Reader
>>>>>>>>   text/plain; class=java.io.Serializable;
>>>>>>>> charset=unicode              text/html; class=java.lang.String
>>>>>>>>   text/html; class=java.io.Serializable;
>>>>>>>> charset=unicode               text/html;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   unknown/flavor; class=java.io.InputStream text/html;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   unknown/flavor; class=java.io.InputStream text/html;
>>>>>>>> class=java.io.InputStream
>>>>>>>>   text/html; class=java.io.Reader text/html;
>>>>>>>> class=java.io.InputStream; charset=cp1251
>>>>>>>>   text/html; class=java.lang.String text/plain;
>>>>>>>> class=java.io.Reader
>>>>>>>>   text/html; class=java.io.InputStream;
>>>>>>>> charset=unicode                text/plain; class=java.lang.String
>>>>>>>>   text/html; class=java.io.InputStream;
>>>>>>>> charset=unicode                text/plain;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   text/html; class=java.io.InputStream text/plain;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   text/html; class=java.io.InputStream;
>>>>>>>> charset=cp1251                 text/plain;
>>>>>>>> class=java.io.InputStream
>>>>>>>>   text/plain; class=java.io.InputStream;
>>>>>>>> charset=unicode               text/plain;
>>>>>>>> class=java.io.InputStream; charset=cp1251
>>>>>>>>   text/plain; class=java.io.InputStream;
>>>>>>>> charset=unicode               text/unknown; class=java.io.Reader
>>>>>>>>   text/plain; class=java.io.InputStream text/unknown;
>>>>>>>> class=java.lang.String
>>>>>>>>   text/plain; class=java.io.InputStream;
>>>>>>>> charset=cp1251                text/unknown;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   text/unknown; class=java.io.InputStream;
>>>>>>>> charset=unicode             text/unknown;
>>>>>>>> class=java.io.InputStream; charset=unicode
>>>>>>>>   text/unknown; class=java.io.InputStream;
>>>>>>>> charset=cp1251              text/unknown; 
>>>>>>>> class=java.io.InputStream
>>>>>>>>   unknown/flavor; class=java.lang.Object text/unknown;
>>>>>>>> class=java.io.InputStream; charset=cp1251
>>>>>>>>   text/unknown; class=java.lang.Object;
>>>>>>>> charset=unicode                text/unknown;
>>>>>>>> class=java.io.Serializable; charset=unicode
>>>>>>>>   text/unknown; class=java.io.Reader text/plain;
>>>>>>>> class=java.io.Serializable; charset=unicode
>>>>>>>>   text/unknown; class=java.lang.String text/html;
>>>>>>>> class=java.io.Serializable; charset=unicode
>>>>>>>>   text/unknown; class=java.io.InputStream;
>>>>>>>> charset=unicode             unknown/flavor;
>>>>>>>> class=java.io.InputStream
>>>>>>>>   text/unknown; class=java.io.InputStream unknown/flavor;
>>>>>>>> class=java.io.InputStream
>>>>>>>>   text/unknown; class=java.lang.Object unknown/flavor;
>>>>>>>> class=java.lang.Object
>>>>>>>>   text/plain; class=java.lang.String text/unknown;
>>>>>>>> class=java.lang.Object; charset=unicode
>>>>>>>>   text/plain; class=java.lang.Object;
>>>>>>>> charset=unicode                  text/unknown;
>>>>>>>> class=java.lang.Object
>>>>>>>>   text/plain; class=java.lang.Object text/plain;
>>>>>>>> class=java.lang.Object; charset=unicode
>>>>>>>>   text/plain; class=java.io.Reader text/plain;
>>>>>>>> class=java.lang.Object
>>>>>>>>   text/html; class=java.lang.Object;
>>>>>>>> charset=unicode                   text/html;
>>>>>>>> class=java.lang.Object; charset=unicode
>>>>>>>>   text/html; class=java.lang.Object text/html;
>>>>>>>> class=java.lang.Object
>>>>>>>>
>>>>>>>>
>>>>>>>>>  - Can you run all related regression and jck tests.
>>>>>>>>
>>>>>>>> Executed all 'datatransfer' regression and JCK tests - no
>>>>>>>> regressions detected.
>>>>>>>>
>>>>>>>>> Thanks.
>>>>>>>>>
>>>>>>>>> On 18.09.2014 17:04, anton nashatyrev wrote:
>>>>>>>>>> Hello,
>>>>>>>>>>     could you please review the following fix:
>>>>>>>>>>
>>>>>>>>>> fix: http://cr.openjdk.java.net/~anashaty/8058473/9/webrev.00/
>>>>>>>>>> <http://cr.openjdk.java.net/%7Eanashaty/8058473/9/webrev.00/>
>>>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8058473
>>>>>>>>>>
>>>>>>>>>>     Problem: DataFlavorComparator violates Comparator contract.
>>>>>>>>>>
>>>>>>>>>>     Fix: make the DataFlavorComparator transitive conformant
>>>>>>>>>> (please see the bug comment for details)
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>> Anton.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
>
>



More information about the jdk7u-dev mailing list