Skip to content
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

JDK-8322979: Add informative discussion to Modifier #17338

Closed
wants to merge 4 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Jan 10, 2024

Add a few apiNote concerning source-level modifiers that are not represented in java.lang.reflect.Modifier.


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

Issue

  • JDK-8322979: Add informative discussion to Modifier (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17338

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 10, 2024

👋 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 openjdk bot added the rfr Pull request is ready for review label Jan 10, 2024
@openjdk
Copy link

openjdk bot commented Jan 10, 2024

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Jan 10, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 10, 2024

Webrevs

* @apiNote
* To make a high-fidelity representation of the Java source
* modifiers of a class or member, source-level modifiers that do
* not <em>not</em> have a constant in the this class should be
Copy link
Contributor

Choose a reason for hiding this comment

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

The wording looks okay, just a repeated "not" here.

* @apiNote
* To make a high-fidelity representation of the Java source
* modifiers of a class or member, source-level modifiers that do
* not <em>not</em> have a constant in the this class should be
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* not <em>not</em> have a constant in the this class should be
* <em>not</em> have a constant in this class should be

* To make a high-fidelity representation of the Java source
* modifiers of a class or member, source-level modifiers that do
* not <em>not</em> have a constant in the this class should be
* included and ordered consistent with the full recommended
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* included and ordered consistent with the full recommended
* included and ordered consistently with the full recommended

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, "ordered consistently with" or "with order consistent with", I think both will work here.

Copy link
Member

Choose a reason for hiding this comment

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

I think, Joe might be considering "consistent" to be flat.

Comment on lines +240 to +243
* Java Language Specification</cite>. For example, for a
* {@linkplain Method#toGenericString() method} the "{@link
* Method#isDefault() default}" modifier is ordered immediately
* before "{@code static}" (JLS {@jls 9.4}). For a {@linkplain
Copy link
Member

Choose a reason for hiding this comment

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

Nothing wrong with that, but note that unlike other similar sections, for whatever reason, JLS 9.4 does not suggest this:

If two or more (distinct) ... modifiers appear in a ... declaration, it is customary, though not required, that they appear in the order consistent with that shown above in the production for ...

I mused about the reasons behind it recently, but only JLS experts know them for sure. (CC'in @dansmithcode)

@openjdk
Copy link

openjdk bot commented Jan 12, 2024

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

8322979: Add informative discussion to Modifier

Reviewed-by: alanb

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 65 new commits pushed to the master branch:

  • 999e556: 8312518: [macos13] setFullScreenWindow() shows black screen on macOS 13 & above
  • 8b6293f: 8301994: Remove unused code from awt_List.cpp
  • e33031b: 8323629: Shenandoah: Fix missing include and declaration
  • c5e7245: 8322735: C2: minor improvements of bubble sort used in SuperWord::packset_sort
  • 65a0672: 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT
  • e22ab10: 8322537: Parallel: Remove experimental adjustment in PSAdaptiveSizePolicy
  • be900f1: 8323425: JFR: Auto-generated filename doesn't work with time-limited recording
  • 68c4286: 8323008: filter out harmful -std* flags added by autoconf from CXX
  • 7dc9dd6: 8234502: Merge GenCollectedHeap and SerialHeap
  • ed18222: 8323190: Segfault during deoptimization of C2-compiled code
  • ... and 55 more: https://git.openjdk.org/jdk/compare/e9f7db304559cbc8e2b46ea30496d3c570569f4c...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 12, 2024
@jddarcy
Copy link
Member Author

jddarcy commented Jan 12, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Jan 12, 2024

Going to push as commit 9e9c05f.
Since your change was applied there have been 67 commits pushed to the master branch:

  • c54bca6: 8323617: Add missing null checks to GetMousePositionWithPopup.java test
  • 95a9168: 8323627: Shenandoah: Refactor init logger
  • 999e556: 8312518: [macos13] setFullScreenWindow() shows black screen on macOS 13 & above
  • 8b6293f: 8301994: Remove unused code from awt_List.cpp
  • e33031b: 8323629: Shenandoah: Fix missing include and declaration
  • c5e7245: 8322735: C2: minor improvements of bubble sort used in SuperWord::packset_sort
  • 65a0672: 8319773: Avoid inflating monitors when installing hash codes for LM_LIGHTWEIGHT
  • e22ab10: 8322537: Parallel: Remove experimental adjustment in PSAdaptiveSizePolicy
  • be900f1: 8323425: JFR: Auto-generated filename doesn't work with time-limited recording
  • 68c4286: 8323008: filter out harmful -std* flags added by autoconf from CXX
  • ... and 57 more: https://git.openjdk.org/jdk/compare/e9f7db304559cbc8e2b46ea30496d3c570569f4c...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 12, 2024
@openjdk openjdk bot closed this Jan 12, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 12, 2024
@openjdk
Copy link

openjdk bot commented Jan 12, 2024

@jddarcy Pushed as commit 9e9c05f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jddarcy jddarcy deleted the JDK-8322979 branch October 17, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants