8380956: HexFormat shoud have @ValueBased#30444
Conversation
|
👋 Welcome back ysuenaga! A progress list of the required criteria for merging this PR into |
|
@YaSuenag 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 15 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. ➡️ To integrate this PR with the above commit message to the |
|
There is no particular value to the annotation, except for consistency. |
I think JFR scans this annotation in class files and emits warning events upon synchronization. |
| * }</pre> | ||
| * | ||
| * <p> | ||
| * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a> |
There was a problem hiding this comment.
It looks like the note on value-based is going into the API note, same thing with the normative text about NPE. Doesn't have to be this PR but I think we should consider moving the text up so that it appears before the API note heading.
There was a problem hiding this comment.
I think it should be do in another issue because it affects all of value based classes, and also the text is not normalized. For example:
HexFormat.java:
* <p>
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
* class; use of identity-sensitive operations (including reference equality
* ({@code ==}), identity hash code, or synchronization) on instances of
* {@code HexFormat} may have unpredictable results and should be avoided.
* The {@code equals} method should be used for comparisons.
* <p>
* This class is immutable and thread-safe.
* <p>
Linker.java:
* @implSpec
* Implementations of this interface are immutable, thread-safe and
* <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>.
There was a problem hiding this comment.
I think it should be do in another issue because it affects all of value based classes, and also the text is not normalized.
That's okay, it's clear we have several cases in the docs where normative and other text that appears after the @apiNote makes it appear that the text is part of the API note.
On a few occasions I've made to move the custom block tags that are @apiNote, @implNote .. and the text to the end of the class or method description to avoid the issue. A JEP has been submitted to add "Rish Notes" to API documentation that make help with some of these cases.
|
/integrate |
|
Going to push as commit 2994524.
Your commit was automatically rebased without conflicts. |
In #30392, we found out HexFormat is marked as value based class in Javadoc, but they do not have
@ValueBased.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30444/head:pull/30444$ git checkout pull/30444Update a local copy of the PR:
$ git checkout pull/30444$ git pull https://git.openjdk.org/jdk.git pull/30444/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30444View PR using the GUI difftool:
$ git pr show -t 30444Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30444.diff
Using Webrev
Link to Webrev Comment