Skip to content
This repository has been archived by the owner. It is now read-only.

JDK-8273452: DocTrees.getDocCommentTree should be specified as idempotent #36

Closed
wants to merge 2 commits into from

Conversation

hns
Copy link
Member

@hns hns commented Dec 16, 2021

Please review a doc-only change to add implementation notes to the DocTrees.getDocCommentTree methods, some of which return the same DocCommentTree instance on repeated invocation and some don't. I decided to use @implNote instead of @implSpec as usually I wouldn't expect object identity to be part of a Java API specification.

I verified the described behavior using code analysis and enhancing existing tests. The latter are not included in the commit as this is a noreg-doc issue.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273452: DocTrees.getDocCommentTree should be specified as idempotent

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk18 pull/36/head:pull/36
$ git checkout pull/36

Update a local copy of the PR:
$ git checkout pull/36
$ git pull https://git.openjdk.java.net/jdk18 pull/36/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 36

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk18/pull/36.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 16, 2021

👋 Welcome back hannesw! 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 label Dec 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Dec 16, 2021

@hns The following labels will be automatically applied to this pull request:

  • compiler
  • javadoc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added javadoc compiler labels Dec 16, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 16, 2021

Webrevs

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

I guess it's a gray area whether it should be an implSpec or an implNote.

It is a relatively important aspect of the API, because the operations are expensive, and even cause some downstream caching.

For now, it's enough that it is noted in some fashion.

As a general style note, I would suggest a blank line before each implNote, and change "The implementation of this method" to either "The default implementation of this method" or just "This implementation".

@openjdk
Copy link

@openjdk openjdk bot commented Jan 3, 2022

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

8273452: DocTrees.getDocCommentTree should be specified as idempotent

Reviewed-by: jjg

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

  • 06b4d49: 8278344: sun/security/pkcs12/KeytoolOpensslInteropTest.java test fails because of different openssl output
  • 8f969a1: 8278930: javac tries to compile a file twice via PackageElement.getEnclosedElements
  • 642ab34: 8278373: JavacTrees.searchMethod finds incorrect match
  • d65c665: 8279527: Dereferencing segments backed by different scopes leads to pollution
  • 967ef0c: 8278020: ~13% variation in Renaissance-Scrabble
  • 7c792f2: 8279333: Some JFR tests do not accept 'GCLocker Initiated GC' as a valid GC Cause
  • 564c8c6: 8279529: ProblemList java/nio/channels/DatagramChannel/ManySourcesAndTargets.java on macosx-aarch64
  • 590fa9d: 8278612: [macos] test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS
  • 5cd9515: 8279525: ProblemList java/awt/GraphicsDevice/CheckDisplayModes.java on macosx-aarch64
  • 9d43d25: 8278897: Alignment of heap segments is not enforced correctly
  • ... and 42 more: https://git.openjdk.java.net/jdk18/compare/e82310f3605b37519129ea34b2a6f99ee3ccc63a...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 label Jan 3, 2022
@hns
Copy link
Member Author

@hns hns commented Jan 10, 2022

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jan 10, 2022

Going to push as commit 354c904.
Since your change was applied there have been 52 commits pushed to the master branch:

  • 06b4d49: 8278344: sun/security/pkcs12/KeytoolOpensslInteropTest.java test fails because of different openssl output
  • 8f969a1: 8278930: javac tries to compile a file twice via PackageElement.getEnclosedElements
  • 642ab34: 8278373: JavacTrees.searchMethod finds incorrect match
  • d65c665: 8279527: Dereferencing segments backed by different scopes leads to pollution
  • 967ef0c: 8278020: ~13% variation in Renaissance-Scrabble
  • 7c792f2: 8279333: Some JFR tests do not accept 'GCLocker Initiated GC' as a valid GC Cause
  • 564c8c6: 8279529: ProblemList java/nio/channels/DatagramChannel/ManySourcesAndTargets.java on macosx-aarch64
  • 590fa9d: 8278612: [macos] test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS
  • 5cd9515: 8279525: ProblemList java/awt/GraphicsDevice/CheckDisplayModes.java on macosx-aarch64
  • 9d43d25: 8278897: Alignment of heap segments is not enforced correctly
  • ... and 42 more: https://git.openjdk.java.net/jdk18/compare/e82310f3605b37519129ea34b2a6f99ee3ccc63a...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated label Jan 10, 2022
@openjdk openjdk bot closed this Jan 10, 2022
@openjdk openjdk bot removed ready rfr labels Jan 10, 2022
@openjdk
Copy link

@openjdk openjdk bot commented Jan 10, 2022

@hns Pushed as commit 354c904.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler integrated javadoc
2 participants