History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2418
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: AlSt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Changes sorting fails

Created: 24/Apr/15 10:43 AM   Updated: 28/Apr/15 06:26 AM
Component/s: None
Affects Version/s: 5.1.40
Fix Version/s: 6.0.12

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
Builds requests can not be processed because of this exception:

jvm 1 | java.lang.IllegalArgumentException: Comparison method violates its general contract!
jvm 1 | at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)
jvm 1 | at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)
jvm 1 | at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)
jvm 1 | at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)
jvm 1 | at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
jvm 1 | at java.util.Arrays.sort(Arrays.java:472)
jvm 1 | at java.util.Collections.sort(Collections.java:155)
jvm 1 | at com.pmease.quickbuild.model.Build.getChanges(Build.java:621)
jvm 1 | at com.pmease.quickbuild.plugin.tracker.core.contribution.IssuesBuildListener.buildFinished(IssuesBuildListener.java:45)
jvm 1 | at com.pmease.quickbuild.DefaultBuildEngine.run(DefaultBuildEngine.java:660)
jvm 1 | at com.pmease.quickbuild.DefaultBuildEngine.process(DefaultBuildEngine.java:383)
jvm 1 | at com.pmease.quickbuild.DefaultBuildEngine.access$000(DefaultBuildEngine.java:131)
jvm 1 | at com.pmease.quickbuild.DefaultBuildEngine$2.run(DefaultBuildEngine.java:1076)
jvm 1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:262)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
jvm 1 | at java.lang.Thread.run(Thread.java:745)

When looking at ChangeSet.compareTo(ChangeSet) the problem can be seen pretty fast:

@Override
public int compareTo(Changeset other) {
if (getDate() == null)
return 1;
else if (other.getDate() == null)
return -1;
else
return other.getDate().compareTo(getDate());
}

When both changeset dates are null they are not considered equal, so the transitivity is not satisfied.

 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.