com.sun.tools.javac.code.Symbol$MethodSymbol includes `javax.lang.model.element.Modifier.SEALED` in the set returned by `getModifiers()` if the method is annotated with `jdk.internal.javac.Restricted`.
The likely reason is that `RESTRICTED` and `SEALED` constants have the same value in `com.sun.tools.javac.code.Flags` and therefore need to be interpreted depending on the kind of symbol it is used on, which is not the case in above method.
This causes JavaDoc to show the `sealed` modifier on restricted methods (seeJDK-8325209).
The likely reason is that `RESTRICTED` and `SEALED` constants have the same value in `com.sun.tools.javac.code.Flags` and therefore need to be interpreted depending on the kind of symbol it is used on, which is not the case in above method.
This causes JavaDoc to show the `sealed` modifier on restricted methods (see
- duplicates
-
JDK-8325209 JavaDoc displays sealed modifier on restricted methods
-
- Closed
-