-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8361401: Warnings for use of Sun APIs should not be mandatory #26129
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back mcimadamore! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@mcimadamore The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
/csr |
@mcimadamore has indicated that a compatibility and specification (CSR) request is needed for this pull request. @mcimadamore please create a CSR request for issue JDK-8361402 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
During Java 8, we changed the code that reported use of Sun API warnings (e.g.
com.sun.misc.Unsafe
) to useLog::mandatoryWarning
instead ofLog::strictWarning
. This change had two effects:The latter is particularly bad, because the definition of a mandatory warning is that of a warning mandated by the specification. Currently we only use the mandatory status for unchecked, deprecation and preview warnings.
This PR reverts the behavior to what it was before Java 8. That is, the warning for Sun API use is now marked with the
STRICT
flag -- andLog
will not attempt to filter out warnings with such flag. As a result, the (unused) methodLog::strictWarning
can be removed.I've tweaked an existing test to check the kind of the Sun API warnings.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26129/head:pull/26129
$ git checkout pull/26129
Update a local copy of the PR:
$ git checkout pull/26129
$ git pull https://git.openjdk.org/jdk.git pull/26129/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26129
View PR using the GUI difftool:
$ git pr show -t 26129
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26129.diff
Using Webrev
Link to Webrev Comment