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: | projects | Reporter: | abien <abien> |
Component: | Maven | Assignee: | Milos Kleint <mkleint> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ehsavoie, exceptions_reporter |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 198592 |
Attachments: | stacktrace |
Description
abien
2013-02-14 07:17:22 UTC
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 |