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

subtypes of non-sealed types not handled correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 15
    • 14
    • tools

    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

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

            Dates

              Created:
              Updated:
              Resolved: