[
https://issues.redhat.com/browse/DROOLS-4866?page=com.atlassian.jira.plug...
]
Leonid Sotnikov updated DROOLS-4866:
------------------------------------
Steps to Reproduce:
Unfortunately I can't provide real data in order to reproduce the error, since the
data is sensible. However I've managed to mock the activations which trigger the
exception on sorting. I've attached a test to reproduce the error.
- Run SortTest.test, the test fails with an IllegalArgumentException
- The activations are stored in testdata.txt
Each line in testdata.txt represents an activation: <rulename>:\[<ids of
handles>\]
was:
Unfortunately I can't provide real data in order to reproduce the error, since the
data is sensible. However I've managed to mock the activations which trigger the
exception on sorting. I've attached a test to reproduce the error.
- Run SortTest.test
- The activations are stored in testdata.txt
Each line in testdata.txt represents an activation: <rulename>:\[<ids of
handles>\]
ActivationsSorter: Comparison method violates its general contract!
-------------------------------------------------------------------
Key: DROOLS-4866
URL:
https://issues.redhat.com/browse/DROOLS-4866
Project: Drools
Issue Type: Bug
Affects Versions: 7.30.0.Final
Environment: - JDK 1.8.0_181 (64 bit)
Reporter: Leonid Sotnikov
Assignee: Mario Fusco
Priority: Major
Attachments: sorttest.zip
Hi.
While serializing a session with ProtobufOutputMarshaller we've encountered an
exception in a few rare cases when the activations are sorted by {{Collections.sort(
dormant, ActivationsSorter.INSTANCE )}}:
{code}
Caused by: java.lang.IllegalArgumentException: Comparison method violates its general
contract!
at java.util.TimSort.mergeHi(TimSort.java:899)
at java.util.TimSort.mergeAt(TimSort.java:516)
at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
at java.util.TimSort.sort(TimSort.java:254)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at java.util.Collections.sort(Collections.java:175)
(...)
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)