JDK-8190436 : Bug in VisibleMemberMap, including non-deterministic behavior
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2017-10-31
  • Updated: 2018-04-27
  • Resolved: 2018-04-27
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 11
11Resolved
Related Reports
Relates :  
Relates :  
Description
Recent work in the doclet has uncovered some stability issues in VisibleMemberMap.

1. The check for whether a method is overridden is non-deterministic in some cases (e.g. diamond inheritance) and depends on HashMap iteration order.  Changing the HashMap to a LinkedHashMap yields a consistent result, but not necessarily a correct one.

2. The ClassMember.isEqual method was modified in the fix for JDK-8157000, and probably should not have been. This method is supposed to detect signature-equivalent methods, but code to check isSimpleOverride was added, and should probably be removed.
http://hg.openjdk.java.net/jdk10/master/rev/2ea4edfdef8e#l16.135
Comments
This bug should be addressed by JDK-8025091, and is being closed with Not An Issue.
27-04-2018

A 2-file reproducer has been attached, Chrono.java + Intf.java. These two files mimic the characteristics of ChronoField and ChronoUnit described in the previous comment.
31-10-2017

The issues described here are strongly related to the API docs for the JDK classes: java.time.temporal.ChronoField https://docs.oracle.com/javase/9/docs/api/java/time/temporal/ChronoField.html java.time.temporal.ChronoUnit https://docs.oracle.com/javase/9/docs/api/java/time/temporal/ChronoUnit.html Both of these classes have diamond inheritance for toString. Both classes are enums that have a simple (no doc comment) override for toString(), and implement an interface with a non-simple (with doc comment) override for toString.
31-10-2017

Note that this is a bug/correctness issue in VMM, and not a performance issue, like JDK-8025091.
31-10-2017