8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing#2221
Conversation
…mbined with annotation processing Reviewed-by: liach, vromero, dbeaumont
|
👋 Welcome back dbeaumont! A progress list of the required criteria for merging this PR into |
|
@david-beaumont 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 245 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@liach) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/issue JDK-8379906 |
|
@liach Only the author (@david-beaumont) is allowed to issue the |
|
/issue JDK-8379906 |
|
@david-beaumont The primary solved issue for a PR is set through the PR title. Since the current title does not contain an issue reference, it will now be updated. |
|
/integrate |
|
@david-beaumont |
|
/sponsor |
|
Going to push as commit 8aada8b.
Your commit was automatically rebased without conflicts. |
|
@liach @david-beaumont Pushed as commit 8aada8b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Clone of openjdk/jdk#30110, original description:
As part of @david-beaumont's work on #2180, it turned out warnings are sometimes reported to a wrong file when annotation processors are present, and, as a consequence, these warnings are not properly suppressed by @SuppressWarnings.
The reason is simple: the log.useSource is misplaced, and the source in the Log may not be correctly reset. The source is correctly reset if tree == null, which is the normal case without annotation processing. But with annotation processing combined with implicit compilation, tree != null, and the source is never reset to the original value. And subsequent diagnostic then may be assigned to a wrong file.
This PR is moving setting the source to the correct place.
Note that for testCorrectSource, there are multiple warnings printed. This is an pre-existing problem that is sadly harder to fix albeit hopefully with a smaller severity. I think it would be better tackled separately. I've filled https://bugs.openjdk.org/browse/JDK-8378950 for it.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2221/head:pull/2221$ git checkout pull/2221Update a local copy of the PR:
$ git checkout pull/2221$ git pull https://git.openjdk.org/valhalla.git pull/2221/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2221View PR using the GUI difftool:
$ git pr show -t 2221Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2221.diff
Using Webrev
Link to Webrev Comment