This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IllegalArgumentException: Comparison method violates its general contract! | ||
---|---|---|---|
Product: | platform | Reporter: | turneliusz |
Component: | Outline&TreeTable | Assignee: | Martin Entlicher <mentlicher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mentlicher |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 7.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 183359 |
Attachments: |
stacktrace
Dump of variables Screenshot The file that can be used to reproduce this bug The proposed API change that solves inconsistent values during sorting process.. |
Description
turneliusz
2011-12-02 09:36:27 UTC
Created attachment 113739 [details]
stacktrace
Created attachment 113748 [details]
Dump of variables
Created attachment 113750 [details]
Screenshot
Thanks for the dump of variables, we'll hopefully reproduce it with them... *** Bug 206473 has been marked as a duplicate of this bug. *** Created attachment 114260 [details]
The file that can be used to reproduce this bug
I've successfully reproduced this bug on the provided data.
The bug is caused by items that do not manage to evaluate fast enough and return "Evaluating..." value until the real value is retrieved. This corrupts the sorting in cases when a variable returns "Evaluating..." during one comparison and the real value during another comparison. This breaks the consistency. The fix should be to make sure that all variables are fully evaluated before the sorting takes place and also to assure that the variable values can not change until the sorting is finished. Created attachment 114276 [details]
The proposed API change that solves inconsistent values during sorting process..
Please review the attached simple API change that allows to cache the transformed model values during the sorting process. The caching assures that the data can not change during sorting. FYI: This change solves the exception, but some rows may end up unsorted (those that happen to get the "Evaluating..." text). To solve the sorting in this case, I've submitted issue #206486. Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/868ebc55a4b5 User: mentlicher@netbeans.org Log: #205828 Make the comparison symmetric. Thanks for the review, the fix is pushed as changeset: 209630:8c344093bcfa http://hg.netbeans.org/main/rev/8c344093bcfa Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/8c344093bcfa User: mentlicher@netbeans.org Log: #205828 RowMapping.getTransformedValue() method is introduced to assure that we retrieve every cell value only once per any number of calls. |