Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190436

Bug in VisibleMemberMap, including non-deterministic behavior

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 9
    • Fix Version/s: 11
    • Component/s: tools

      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

        Attachments

        1. Chrono.java
          0.1 kB
        2. Intf.java
          0.1 kB

          Issue Links

            Activity

              People

              • Assignee:
                ksrini Kumar Srinivasan
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: