8384068: [lworld] ValueClassPlugin misses some annotations#2405
Conversation
|
👋 Welcome back aboldtch! A progress list of the required criteria for merging this PR into |
|
@xmas92 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 14 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. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
…mprove-ValueClassPlugin
…mprove-ValueClassPlugin
|
Just a friendly ping. The only tests that are currently being affected is |
jsikstro
left a comment
There was a problem hiding this comment.
I think this is going in the right direction. One question:
What if we have a case like below, that will match as true when it shouldn't. But I guess that's rare/bad code.
package jdk.test.lib.valueclass;
import other.AsValueClass;
@AsValueClass
public final class ShadowInSamePackage {}
jsikstro
left a comment
There was a problem hiding this comment.
This is not my area, but I think the revised logic around checking for the AsValueClass annotation is sound and seem to slot it nicely with the surrounding code.
johan-sjolen
left a comment
There was a problem hiding this comment.
This should obviously be done at semantic analysis-time (well, post-semantic analysis-time). I don't get why it has to be done at parse time, but OK, if you say so then I believe you. Besides, this is an improvement.
There are few places which uses the fully qualified name for the
AsValueClassannotation. As a result the plugging does not modify these classes when compiling, so they are still identity classes.I propose improving the robustness of this plugin. We need to do this during parsing so we cannot actually check 100% that it will resolve to the correct annotation. However we can do a best effort, which handles same package, fully qualified, imported and rejects other annotations with the same class name.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2405/head:pull/2405$ git checkout pull/2405Update a local copy of the PR:
$ git checkout pull/2405$ git pull https://git.openjdk.org/valhalla.git pull/2405/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2405View PR using the GUI difftool:
$ git pr show -t 2405Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2405.diff
Using Webrev
Link to Webrev Comment