Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8280744: Allow SuppressWarnings to be used in all declaration contexts #7239

Closed
wants to merge 6 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/lang/SuppressWarnings.java
Original file line number Diff line number Diff line change
@@ -29,14 +29,14 @@
import static java.lang.annotation.ElementType.*;

/**
* Indicates that the compiler warnings to be suppressed in the
* Indicates the warnings to be suppressed at compile time in the
* annotated element, and in all elements contained in the annotated element.
*
* <p>The {@code SuppressWarnings} annotation interface is applicable
* in all declaration contexts, so an {@code @SuppressWarnings}
* annotation can be used on any element.
* As a matter of style, programmers should always use this annotation
* on the most deeply nested element where it is effective. If you want to
* on the most deeply nested element where it is effective. For example, if you want to
* suppress a warning in a particular method, you should annotate that
* method rather than its class.
*
@@ -62,7 +62,7 @@
* <li> Preview warnings, specified by the string {@code "preview"}.
* </ul>
*
* Whether or not a Java compiler recognizes other suppression strings
* Whether or not a Java compiler recognizes other strings
* is a quality of implementation concern.
* Compiler vendors should document the
* additional warning names they support.