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

JavaDoc displays sealed modifier on restricted methods

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 23
    • 22, 23
    • tools
    • None

      JavaDoc shows a `sealed` modifier on methods annotated with `jdk.internal.javac.Restricted`.

      Example: https://download.java.net/java/early_access/jdk22/docs/api/java.base/java/lang/foreign/AddressLayout.html#withTargetLayout(java.lang.foreign.MemoryLayout)

      The likely reason is that `RESTRICTED` and `SEALED` constants have the same value in `com.sun.tools.javac.code.Flags`, though the former is meant for methods and the latter for classes.

      This issue was reported on a github PR: https://github.com/openjdk/jdk/pull/16188#issuecomment-1925960367

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: