RFR: 8247402: rewrite the implementation requirements for Map::compute()
Pavel Rappo
prappo at openjdk.java.net
Tue Oct 13 09:33:17 UTC 2020
On Thu, 1 Oct 2020 07:07:24 GMT, John Lin <github.com+1290376+johnlinp at openjdk.org> wrote:
> This is from the mailing list: http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-June/067213.html
The proposed implementation behaves differently from the existing implementation in the case of `null` value. That is,
when `map.containsKey(key) == true && map.get(key) == null`. The difference is that the proposed implementation will
remove the `(key, null)` mapping if `newValue == null`, whereas the existing implementation will not.
-------------
PR: https://git.openjdk.java.net/jdk/pull/451
More information about the core-libs-dev
mailing list