Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0036762 | Openbravo ERP | A. Platform | public | 2017-09-01 12:10 | 2017-09-21 16:49 |
Reporter | JONHM | ||||
Assigned To | caristu | ||||
Priority | high | Severity | major | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | 3.0PR17Q4 | |||
Merge Request Status | |||||
Review Assigned To | alostale | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | 48093 | ||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0036762: Window personalization list can not be loaded properly due to an error during its sorting | ||||
Description | Window personalization list can not be loaded properly due to an error during its sorting. The list of personalizations for a tab is sorted[1] before returning it to the client. Since Java 7 Collections.sort uses TimSort. Using a non-transitive comparator for sorting in Java >= 7 will throw the following exception: java.lang.IllegalArgumentException: Comparison method violates its general contract! And the PersonalizationComparator is not transitive when checking the priority by client. [1] https://code.openbravo.com/erp/devel/pi/file/4fa54a2fb83d/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java#l270 [^] [2] https://code.openbravo.com/erp/devel/pi/file/4fa54a2fb83d/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java#l601 [^] | ||||
Steps To Reproduce | Option A: ** Ask the environment to Support department ** 1) Open 'Window Personalization' window and set active every views for user 'Diego' and window 'Product' (there will be 21) 2) Open 'Product' window and click the 'Save View' button on the toolbar. The following error is fired in the log (see attached the full log): Caused by: org.openbravo.base.exception.OBException: Exception when getting personalization settings for window ADWindow(140) (name: Product) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:254) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationForWindow(PersonalizationHandler.java:98) ... 57 more Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:895) at java.util.TimSort.mergeAt(TimSort.java:512) at java.util.TimSort.mergeCollapse(TimSort.java:437) at java.util.TimSort.sort(TimSort.java:241) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1454) at java.util.Collections.sort(Collections.java:175) at org.openbravo.client.application.personalization.PersonalizationHandler.sortPersonalizations(PersonalizationHandler.java:270) at org.openbravo.client.application.personalization.PersonalizationHandler.getPersonalizationsForWindow(PersonalizationHandler.java:251) ... 58 more Option B: 1) Attached is patch with a test case that checks if the PersonalizationHandler is transitive. Apply it. 2) Run test. | ||||
Proposed Solution | Change the PersonalizationHandler in order to fulfill the Comparable[1] contract. [1] http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Comparable.html [^] | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=11029&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=11041&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=11043&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2017-09-01 12:10 | JONHM | New Issue | |||
2017-09-01 12:10 | JONHM | Assigned To | => platform | ||
2017-09-01 12:10 | JONHM | OBNetwork customer | => Yes | ||
2017-09-01 12:10 | JONHM | Modules | => Core | ||
2017-09-01 12:10 | JONHM | Support ticket | => 48093 | ||
2017-09-01 12:10 | JONHM | Resolution time | => 1506031200 | ||
2017-09-01 12:10 | JONHM | Triggers an Emergency Pack | => No | ||
2017-09-01 12:10 | JONHM | File Added: personalizationView.mp4 | |||
2017-09-05 18:29 | caristu | Summary | 'Save button' on the toolbar is not shown when containing many views having its personalization too complex => Window personalization list can not be loaded properly due to an error during its sorting | ||
2017-09-05 18:29 | caristu | Description Updated | bug_revision_view_page.php?rev_id=15821#r15821 | ||
2017-09-05 18:29 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=15823#r15823 | ||
2017-09-05 18:29 | caristu | Proposed Solution updated | |||
2017-09-05 18:29 | caristu | File Added: stackTrace.txt | |||
2017-09-05 18:30 | caristu | File Added: testIssue36762.diff | |||
2017-09-05 18:31 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=15824#r15824 | ||
2017-09-05 18:38 | hgbot | Checkin | |||
2017-09-05 18:38 | hgbot | Note Added: 0098854 | |||
2017-09-05 18:39 | caristu | Assigned To | platform => caristu | ||
2017-09-05 18:56 | caristu | Status | new => acknowledged | ||
2017-09-05 18:57 | caristu | Status | acknowledged => scheduled | ||
2017-09-06 08:59 | hgbot | Checkin | |||
2017-09-06 08:59 | hgbot | Note Added: 0098857 | |||
2017-09-06 08:59 | hgbot | Status | scheduled => resolved | ||
2017-09-06 08:59 | hgbot | Resolution | open => fixed | ||
2017-09-06 08:59 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/1db6083af55beef5807175ef1ec7147a1410168e [^] | ||
2017-09-06 09:06 | caristu | Review Assigned To | => alostale | ||
2017-09-06 09:14 | caristu | File Deleted: testIssue36762.diff | |||
2017-09-06 09:14 | caristu | File Added: testIssue36762.diff | |||
2017-09-08 12:18 | alostale | Note Added: 0098905 | |||
2017-09-08 12:18 | alostale | Status | resolved => closed | ||
2017-09-08 12:18 | alostale | Fixed in Version | => 3.0PR17Q4 | ||
2017-09-21 16:49 | hudsonbot | Checkin | |||
2017-09-21 16:49 | hudsonbot | Note Added: 0099361 | |||
2017-09-21 16:49 | hudsonbot | Checkin | |||
2017-09-21 16:49 | hudsonbot | Note Added: 0099363 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|