[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-core-libs-dev
Subject: Re: RFR: JDK-8323760 clarify specification of Map::putIfAbsent return value [v3]
From: Stuart Marks <smarks () openjdk ! org>
Date: 2024-03-27 2:06:30
Message-ID: z8sbGwpgJyKu-lLAcbYuDPTxQbfyr_y7-PUlEItK8ws=.027b7726-ad92-4286-a821-cba4c357991b () github ! com
[Download RAW message or body]
On Wed, 14 Feb 2024 20:46:17 GMT, John Hendrikx <jhendrikx@openjdk.org> wrote:
> > Update the documentation for `@return` tag of `putIfAbsent` to match the main \
> > description. `putIfAbsent` uses the same wording as `put` for its `@return` tag, \
> > but that is incorrect. `putIfAbsent` never returns the **previous** value, as \
> > the whole point of the method is not the replace the value if it was present. As \
> > such, if it returns a value, it is the **current** value, and in all other cases \
> > it will return `null`.
>
> John Hendrikx has updated the pull request incrementally with one additional commit \
> since the last revision:
> Use new suggestion and remove original clarification
See CSR comments from Martin Buchholz:
https://bugs.openjdk.org/browse/JDK-8325811?focusedId=14659527&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14659527
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17438#issuecomment-2021785703
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic