<Swing Dev> RFR JDK-8241291: JCK test javax_swing/text/DefaultStyledDocument/ElementSpec/ESpecCtor.html fails

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Fri Mar 20 03:12:24 UTC 2020


On 20-Mar-20 12:00 AM, Philip Race wrote:
>    49         int lengthes[] = { 0, 1, 10 };
>    50         int offs[] = { 0, 1, 6 };
>    51         String text = "The text"
> lengths not lengthes
>
> I am a bit surprised, or puzzled, or maybe not understanding how
> it is legal to specify text of length 8, but offsets + lengths which
> would exceed that. I presume the implementation is robust against this.
> But why did you pick those values ?

These are the values used in the jck tests so I reused that.

Regards
Prasanta
> -phil
>
>
> On 3/19/20, 10:41 AM, Prasanta Sadhukhan wrote:
>> Hi All,
>>
>> Please review a fix for a jck issue where the test 
>> javax_swing/text/DefaultStyledDocument/ElementSpec/ESpecCtor.html is 
>> seen to fail after JDK-8241078 fix.
>>
>> Issue was because the JCK test expects ElementSpec.getArray() to 
>> return the same text as sent to ElementSpec constructor and the above 
>> fix uses "offset" to copy the text instead of the full text.
>>
>> Fix is to copy the full text into ElementSpec.data and store the 
>> correct offset.
>>
>> It fixes the JCK issue and also 8241078 regression testcase. All JCK 
>> javax_swing/text/DefaultStyledDocument/ testcases pass after this fix.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8241291
>>
>> webrev: http://cr.openjdk.java.net/~psadhukhan/8241291/webrev.0/
>>
>> Regards
>> Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200320/97c3b4c3/attachment.htm>


More information about the swing-dev mailing list