-
Notifications
You must be signed in to change notification settings - Fork 6k
8344159: Add lint warnings for unnecessary warning suppression #25167
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
Draft
archiecobbs
wants to merge
70
commits into
openjdk:master
Choose a base branch
from
archiecobbs:JDK-8344159
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
@archiecobbs this pull request can not be integrated into git checkout JDK-8344159
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build
build-dev@openjdk.org
client
client-libs-dev@openjdk.org
compiler
compiler-dev@openjdk.org
core-libs
core-libs-dev@openjdk.org
csr
Pull request needs approved CSR before integration
hotspot-jfr
hotspot-jfr-dev@openjdk.org
kulla
kulla-dev@openjdk.org
serviceability
serviceability-dev@openjdk.org
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for warning about
@SuppressWarnings
annotations that are unnecessary because they don't actually suppress any warnings.The JDK itself contains 400+ instances of unnecessary
@SuppressWarnings
annotations. The relevant build files have been updated accordingly to include the-Xlint:-suppression
compiler flag.Summary of changes:
@SuppressWarnings
annotations that don't actually suppress any warnings and a new lint categorysuppression
that includes it (default disabled)Log.warning()
to automatically validate any current suppression of the warning's lint categoryLint.isEnabled()
andLint.isSuppressed()
with parameterboolean validate
to optionally also validate any applicable suppressionLint.isActive()
to test whether a category is enabled or suppression of the category is being trackedLintMapper
to keep track of which suppressions are validated and (later) warn about those that never are*.gmk
build files to suppresssuppression
warnings so that building with-Werror
still worksPrerequisites to this PR:
Progress
Warning
6723459: javac to flag where warning suppression is not required
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25167/head:pull/25167
$ git checkout pull/25167
Update a local copy of the PR:
$ git checkout pull/25167
$ git pull https://git.openjdk.org/jdk.git pull/25167/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25167
View PR using the GUI difftool:
$ git pr show -t 25167
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25167.diff