<Swing Dev> RFR JDK-8241291: JCK test javax_swing/text/DefaultStyledDocument/ElementSpec/ESpecCtor.html fails
Philip Race
philip.race at oracle.com
Thu Mar 19 18:30:27 UTC 2020
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 ?
-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/20200319/9401e8a9/attachment.htm>
More information about the swing-dev
mailing list