8381012: Add warning for == for MemorySegment.NULL#30653
8381012: Add warning for == for MemorySegment.NULL#30653minborg wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back pminborg! A progress list of the required criteria for merging this PR into |
|
@minborg 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 7 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 |
| * The {@linkplain MemorySegment#maxByteAlignment() maximum byte alignment} for | ||
| * the {@code NULL} segment is of 2<sup>62</sup>. | ||
| * | ||
| * @apiNote Clients should avoid using {@code ==} to compare a segment with |
There was a problem hiding this comment.
Is this api note not already covered if the implementations are meant to be treated as value based, as in no identity comparisons currently?
Though I agree its currently an easy logic error currently.
liach
left a comment
There was a problem hiding this comment.
Looks reasonable. Since this is api notes, don't think we need a CSR.
This PR proposes to improve the documentation for
MemorySegment.NULL, adding an@apiNotediscouraging the use of==onMemorySegment.NULL.This PR superseeds #30501
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/30653/head:pull/30653$ git checkout pull/30653Update a local copy of the PR:
$ git checkout pull/30653$ git pull https://git.openjdk.org/jdk.git pull/30653/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 30653View PR using the GUI difftool:
$ git pr show -t 30653Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/30653.diff
Using Webrev
Link to Webrev Comment