JDK-8042601 : Javadoc sort fails
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-05-07
  • Updated: 2014-07-07
  • Resolved: 2014-05-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b14Fixed
Related Reports
Duplicate :  
Relates :  
Description
In JDK-8039410, new a new Comparator was introduced in javadoc. This causes the build to fail on our proposed new Linux machines in the test JPRT queue. I have not seen the failure anywhere else, but on those machines it's very consistent when building the docs target for the jdk.

The error message is:
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:435)
	at java.util.TimSort.sort(TimSort.java:241)
	at java.util.Arrays.sort(Arrays.java:1507)
	at java.util.ArrayList.sort(ArrayList.java:1439)
	at com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.sortIndexMap(IndexBuilder.java:115)
	at com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.buildIndexMap(IndexBuilder.java:151)
	at com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.<init>(IndexBuilder.java:103)
	at com.sun.tools.doclets.internal.toolkit.util.IndexBuilder.<init>(IndexBuilder.java:82)
	at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:122)
	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:144)
	at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:82)
	at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:80)
	at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310)
	at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189)
	at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366)
	at com.sun.tools.javadoc.Start.begin(Start.java:219)
	at com.sun.tools.javadoc.Start.begin(Start.java:205)
	at com.sun.tools.javadoc.Main.execute(Main.java:64)
	at com.sun.tools.javadoc.Main.main(Main.java:54)

which I understand means that the comparator method isn't correct, most likely the transitive condition is not upheld.