<Swing Dev> [9] Review Request for 8078514: Nightly: api/javax_swing/DefaultRowSorter/index_ModelStructChanged failure
Semyon Sadetsky
semyon.sadetsky at oracle.com
Thu May 21 14:34:03 UTC 2015
Hello,
I have decided to remake the fix.
The reason for that is sun.swing.FilePane class. One of its inner
classes extends DefaultRowSorter and relays on lazy initialization of
the DefaultRowSorter in unsorted state. After removing the lazy init the
FilePane crashes with AOB exception. This can be fixed, but I think it
will be too big change for the issue and users can be already using the
DefaultRowSorter in the similar way.
Here is the new approach:
http://cr.openjdk.java.net/~ssadetsky/8078514/webrev.01/
It looks a little bit risky ,but all related tests have been passed.
--Semyon
On 5/19/2015 2:03 PM, Alexander Scherbatiy wrote:
> On 5/15/2015 5:49 PM, Semyon Sadetsky wrote:
>> Hello,
>>
>> Please review fix for JDK9:
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8078514
>> webrev: http://cr.openjdk.java.net/~ssadetsky/8078514/webrev.00/
>
> DefaultRowSorter
> 221 allChanged();
> 222 modelRowCount = getModelWrapper().getRowCount();
>
> - This can be moved to a private method that will be used both in the
> public modelStructureChanged() and setModelWrapper() methods.
>
> 532 public void sort()
> - Could the rawFilter be null in case viewToModel != null an
> !isUnsorted() ?
> - isUnsorted() method is called twice. Is it possible to store its
> value to a variable and use it?
>
> Thanks,
> Alexandr.
>
>>
>> The 6894632 fix violated a contract between the table and its row
>> sorter: the sorter should receive TableChanged events even if table
>> is not sorted actually.
>> Another way to fix 6894632 is to initialize sorter internal
>> structures instantly. The last is applied in the fix.
>>
>> --Semyon
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20150521/fd4a8c72/attachment.html>
More information about the swing-dev
mailing list