<Swing Dev> [9] Review Request for 8133864: Wrong display, when the document I18n properties is true.
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Fri Sep 11 14:52:38 UTC 2015
On 9/10/2015 6:36 PM, Semyon Sadetsky wrote:
>
>
> On 9/10/2015 4:14 PM, Alexander Scherbatiy wrote:
>> On 9/9/2015 3:43 PM, Semyon Sadetsky wrote:
>>> Hello,
>>>
>>> Please review fix for JDK9:
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8133864
>>> webrev: http://cr.openjdk.java.net/~ssadetsky/8133864/webrev.00/
>>>
>>> For the i18n mode the TextLayoutStrategy reorders child views in
>>> paragraph's row according to the bidi leveles. To reorder the
>>> CompositeView.replace() method is called which contains the same
>>> views but in different order. The replace() method has an issue
>>> because it can damage inner hierarchy of the child view by setting
>>> its parent to null.
>>> The fix solution introduces a check if a view item is in use before
>>> nullifying its parent.
>>
>> Would it be faster to use HashSet instead of a list for the
>> contains() method?
> It depends on number of elements. Usually the array contains few
> amount of child views. asList() just wraps an existing array while
> HashSet need to be built from scratch.
I run NetBeans and it passes 916 views to the
CompositeView.replace() method.
Thanks,
Alexandr.
>>
>> Thanks,
>> Alexandr.
>>
>>>
>>> --Semyon
>>
>
More information about the swing-dev
mailing list