Skip to content

Conversation

@jddarcy
Copy link
Member

@jddarcy jddarcy commented Jan 7, 2026

The use of "enclosed" in javax.annotation.processing.Processor looks to be using a more colloquial definition than the JLS-eque notion of "enclosed" used in parts of the javax.lang.model API.

Instead, this PR proposes to switch from "enclosed" to "included," a term already used in RoundEnvironment for the concept in question.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8374660 to be approved

Issues

  • JDK-8374658: Consider use of "included" rather than "enclosed" in jx.a.p.Processor (Enhancement - P4)
  • JDK-8374660: Consider use of "included" rather than "enclosed" in jx.a.p.Processor (CSR)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29076

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29076.diff

Using Webrev

Link to Webrev Comment

@jddarcy
Copy link
Member Author

jddarcy commented Jan 7, 2026

The use of "enclosed" in javax.annotation.processing.Processor looks to be using a more colloquial definition than the JLS-eque notion of "enclosed" used in parts of the javax.lang.model API.

Instead, this PR proposes to switch from "enclosed" to "included," a term already used in RoundEnvironment for the concept in question.

Once there is agreement on the details of the wording changes, I'll file the CSR, etc.

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 7, 2026

👋 Welcome back darcy! A progress list of the required criteria for merging this PR into master 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

openjdk bot commented Jan 7, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title JDK-8374658: Consider use of "included" rather than "enclosed" in jx.a.p.Processor 8374658: Consider use of "included" rather than "enclosed" in jx.a.p.Processor Jan 7, 2026
@openjdk openjdk bot added csr Pull request needs approved CSR before integration compiler compiler-dev@openjdk.org labels Jan 7, 2026
@openjdk
Copy link

openjdk bot commented Jan 7, 2026

@jddarcy The following label will be automatically applied to this pull request:

  • compiler

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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 7, 2026
@mlbridge
Copy link

mlbridge bot commented Jan 7, 2026

Webrevs

* For a given round, the tool computes the set of annotation
* interfaces that are present on the elements enclosed within the
* interfaces that are present on the elements {@linkplain RoundEnvironment#getElementsAnnotatedWith(TypeElement) included} within the
* root elements. If there is at least one annotation interface
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll re-flow the paragraph once the wording is agree to; n the initial iteration I wanted to make clear what exactly was changing -- replacing "enclosed" with a link to a method implementing the "included" definition.

@liach
Copy link
Member

liach commented Jan 9, 2026

RoundEnviroment uses:

Only package elements, module elements, and type elements included in this round of annotation processing, or declarations of members, constructors, parameters, type parameters, or record components declared within those, are returned.

I would recommend consistency, that we update "enclosed within" to "declared within" or update RoundEnvironment, while the other "enclosed" to "included" look good.

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

Labels

compiler compiler-dev@openjdk.org csr Pull request needs approved CSR before integration rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants