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
8268148: unchecked warnings handle ? and ? extends Object differently #5224
8268148: unchecked warnings handle ? and ? extends Object differently #5224
Conversation
|
@vicente-romero-oracle 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. |
Webrevs
|
ping |
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.
Overall, looks reasonable. A few questions/comments inline.
* @test | ||
* @bug 8268148 | ||
* @summary unchecked warnings handle ? and ? extends Object differently | ||
* @compile -Xlint:all UnboundAndBoundByObjectTest.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.
Should there be a verification of the output? Possibly -Werror
?
return kind == UNBOUND; | ||
// is it `?` or `? extends Object`? | ||
return kind == UNBOUND || | ||
(kind == EXTENDS && type.hasTag(CLASS) && ((ClassType)type).supertype_field == Type.noType); |
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.
For the test on whether type
is j.l.Object, would something like this work better?
(kind == EXTENDS && type.hasTag(CLASS) && ((ClassType)type).supertype_field == Type.noType); | |
(kind == EXTENDS && type.tsym.flatName() == type.tsym.name.table.names.java_lang_Object); |
Just an idea. (Sadly, we can't use Symtab
here, that would be ideal.)
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, thanks!
@vicente-romero-oracle This change now passes all automated pre-integration checks. 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 123 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
thanks for the review |
/integrate |
Going to push as commit ff4018b.
Your commit was automatically rebased without conflicts. |
@vicente-romero-oracle Pushed as commit ff4018b. |
Please review this PR. Currently javac handles differently
?
and? extends Object
when reporting unchecked warnings when according to the spec they should be handled the same way. This PR is fixing this.TIA
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5224/head:pull/5224
$ git checkout pull/5224
Update a local copy of the PR:
$ git checkout pull/5224
$ git pull https://git.openjdk.java.net/jdk pull/5224/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5224
View PR using the GUI difftool:
$ git pr show -t 5224
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5224.diff