Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 13
-
Fix Version/s: 14
-
Component/s: specification
-
Labels:
-
Subcomponent:
Description
The API specification for java.lang.SuppressWarnings states:
"The presence of unrecognized warning names is not an error: Compilers must ignore any warning names they do not recognize. They are, however, free to emit a warning if an annotation contains an unrecognized warning name."
https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/SuppressWarnings.html#value()
This requirement to ignore unknown strings is not included in JLS 9.6.4.5. @SuppressWarnings. The JLS and API spec should be consistent in the requirements on compilers in handling the annotation.
"The presence of unrecognized warning names is not an error: Compilers must ignore any warning names they do not recognize. They are, however, free to emit a warning if an annotation contains an unrecognized warning name."
https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/SuppressWarnings.html#value()
This requirement to ignore unknown strings is not included in JLS 9.6.4.5. @SuppressWarnings. The JLS and API spec should be consistent in the requirements on compilers in handling the annotation.
Attachments
Issue Links
- relates to
-
JDK-8230854 Cleanup SuppressWarnings in test lib and remove noisy traces in StreamPumper
-
- Resolved
-
-
JDK-8231433 1.5: Robust handling of code using essential APIs associated with preview features
-
- Resolved
-