-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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-8290901: Reduce use of -source in langtools tests #9622
Conversation
👋 Welcome back darcy! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
I think you can probably simply and sometimes delete the -Xlint
option ... specifically, to remove the -options
sub-option.
@@ -4,8 +4,8 @@ | |||
* | |||
* @summary Incorrect thrown type determined for unchecked invocations | |||
* @author Daniel Smith | |||
* @compile/fail/ref=T7015430_1.out -source 7 -Xlint:-options,unchecked -XDrawDiagnostics T7015430.java | |||
* @compile/fail/ref=T7015430_2.out -Xlint:unchecked -XDrawDiagnostics T7015430.java | |||
* @compile/fail/ref=T7015430_1.out --release 7 -Xlint:-options,unchecked -XDrawDiagnostics T7015430.java |
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.
You may be able to remove -options
from -Xlint
-- the value is probably there to suppress the warnings that you have deleted elsewhere
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.
There are warnings for using "--release 7" because of the age of 7, but otherwise I've updated the PR to remove unneeded uses of -Xlint:-options.
@@ -4,8 +4,7 @@ | |||
* | |||
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 | |||
* @author Maurizio Cimadamore | |||
* @compile/fail/ref=Neg09a.out Neg09a.java -source 8 -XDrawDiagnostics -Xlint:-options | |||
* | |||
* @compile/fail/ref=Neg09a.out Neg09a.java --release 8 -XDrawDiagnostics -Xlint:-options |
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.
another -options
@@ -4,8 +4,7 @@ | |||
* | |||
* @summary Check that diamond is not allowed with anonymous inner class expressions at source < 9 | |||
* @author Maurizio Cimadamore | |||
* @compile/fail/ref=Neg09d.out Neg09d.java -source 8 -XDrawDiagnostics -Xlint:-options | |||
* | |||
* @compile/fail/ref=Neg09d.out Neg09d.java --release 8 -XDrawDiagnostics -Xlint:-options |
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.
-options
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.
generally, a nice cleanup, but check out NestedCapture.java
* @compile NestedCapture.java | ||
* @compile -Xlint:-options -source 7 NestedCapture.java | ||
* @compile NestedCapture.java |
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.
Did too much get removed here? Should there be a --release 7
?
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.
Good catch; fixed.
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.
You probably don't need the -Xlint:-options
in this case, because you are not checking the output with a reference output file, so the warning is mostly harmless.
I'll approve the review and leave it to you to decide whether to suppress the -Xlint:-options
@jddarcy This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 7 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Yes; the test passes with or without |
/integrate |
Going to push as commit cc2861a.
Your commit was automatically rebased without conflicts. |
To a first approximation, this change replaces use of "-source", where possible, with the preferable "--release" javac option. (There are cases where this swap is not desirable, such as when newer library features are being used in the test.)
A few unneeded uses of -source were removed entirely.
I'll update copyrights before any push.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9622/head:pull/9622
$ git checkout pull/9622
Update a local copy of the PR:
$ git checkout pull/9622
$ git pull https://git.openjdk.org/jdk pull/9622/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9622
View PR using the GUI difftool:
$ git pr show -t 9622
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9622.diff