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.
This bug was originally marked as duplicate of bug 220248, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related. Build: NetBeans IDE 7.3 RC2 (Build 201302050851) VM: Java HotSpot(TM) 64-Bit Server VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_13-b20 OS: Mac OS X User Comments: abien: Happend during "add dependency" in a pom.xml and searching for juni Stacktrace: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:835) at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:453) at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376) at java.util.ComparableTimSort.sort(ComparableTimSort.java:182) at java.util.ComparableTimSort.sort(ComparableTimSort.java:146) at java.util.Arrays.sort(Arrays.java:472)
Created attachment 131375 [details] stacktrace
https://jira.codehaus.org/browse/MPIR-247 could be related, my current thinking is that the error surfaces at some yet unknown times in org.apache.maven.artifact.versioning.ComparableVersion that we are using for comparing the versions properly
*** Bug 230698 has been marked as a duplicate of this bug. ***
*** Bug 231488 has been marked as a duplicate of this bug. ***
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=198592
http://hg.netbeans.org/core-main/rev/7c3aee67814e adds more logging - lists all versions so that we at least can write a testcase with given version numbers to reproduce the issue. at the same time, we rethrow the exception only when in early access mode (dev builds and betas) and ignore (log only) in releases. That means the results will be unsorted when the issue is encountered in release builds. closing as fixed, but I expect to reopen the issue when the new exception with additional logging appears.
Integrated into 'main-silver', will be available in build *201307012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/7c3aee67814e User: Milos Kleint <mkleint@netbeans.org> Log: #226100 log version numbers used when sorting, only rethrow the exception in -ea builds, in final ones, just keep the list unsorted/half-sorted
Integrated into 'main-silver', will be available in build *201401240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/459d48e8853f User: Milos Kleint <mkleint@netbeans.org> Log: #240845, #226100 apparently returning -1 * ComparableVersion.compareTo() is responsible for the IllegalArgumentException coming from the sort algorithm on 1.7. Experimentally verified with help of provided versions that keeping the low-to-high version ordering is not causing trouble. I suspect that some other result set might though. As a result, versions are now sorted in opposite way than they used to.
thanks to jhavlin we have a reproducible testcase that I can file upstream - https://jira.codehaus.org/browse/MNG-5568 I'm going to revert the 459d48e8853f changeset and will remove the exception being logged with asserts
Integrated into 'main-silver', will be available in build *201401260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/05bfed97ef39 User: Milos Kleint <mkleint@netbeans.org> Log: #240845, #226100 thanks to jhavlin we now have a reproducible testcase to file upstream, disabling the assert + reverting to -c for version comparisons