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

subtypes of non-sealed types not handled correctly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 15
    • Component/s: tools
    • Labels:

      Description

      Subtypes of non-sealed types incorrectly trigger the error message about needing one of sealed, non-sealed or final.

      See the attached program. Try deleting 'final" from PublicImpl2a on line 8.

      $ ./build/linux-x86_64-server-release/images/jdk/bin/javadoc -d play/private-sealed/api --enable-preview --source 15 play/private-sealed/src/C.java
      Loading source file play/private-sealed/src/C.java...
      Constructing Javadoc information...
      play/private-sealed/src/C.java:8: error: one of: sealed, non-sealed or final modifiers expected
          public static class PublicImpl2a extends PublicImpl2 { }
                                   ^
      1 error

      The message goes away when the class is made final.

        Attachments

          Activity

            People

            • Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              jjg Jonathan Gibbons
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: