Skip to content

8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing#2221

Closed
david-beaumont wants to merge 1 commit intoopenjdk:lworldfrom
david-beaumont:patch_JDK_8378740
Closed

8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing#2221
david-beaumont wants to merge 1 commit intoopenjdk:lworldfrom
david-beaumont:patch_JDK_8378740

Conversation

@david-beaumont
Copy link
Copy Markdown
Contributor

@david-beaumont david-beaumont commented Mar 12, 2026

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

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/2221/head:pull/2221
$ git checkout pull/2221

Update a local copy of the PR:
$ git checkout pull/2221
$ git pull https://git.openjdk.org/valhalla.git pull/2221/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2221

View PR using the GUI difftool:
$ git pr show -t 2221

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/2221.diff

Using Webrev

Link to Webrev Comment

…mbined with annotation processing

Reviewed-by: liach, vromero, dbeaumont
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 12, 2026

👋 Welcome back dbeaumont! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

@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:

8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing

Reviewed-by: liach

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 lworld branch:

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 /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@liach
Copy link
Copy Markdown
Member

liach commented Mar 12, 2026

/issue JDK-8379906

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

@liach Only the author (@david-beaumont) is allowed to issue the /issue command.

@david-beaumont
Copy link
Copy Markdown
Contributor Author

/issue JDK-8379906

@openjdk openjdk bot changed the title [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing 8379906: [lworld] CLONE - Suppressed warnings reported when implicit compilation is combined with annotation processing Mar 12, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

@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.

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 12, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 12, 2026

Webrevs

@david-beaumont
Copy link
Copy Markdown
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 12, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

@david-beaumont
Your change (at version 8a621b6) is now ready to be sponsored by a Committer.

@liach
Copy link
Copy Markdown
Member

liach commented Mar 12, 2026

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

Going to push as commit 8aada8b.
Since your change was applied there have been 245 commits pushed to the lworld branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 12, 2026
@openjdk openjdk bot closed this Mar 12, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 12, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 12, 2026

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants