On Tue, 13 May 2025 14:39:36 GMT, Luca Kellermann <d...@openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address comments > > src/java.base/share/classes/java/util/ImmutableCollections.java line 1732: > >> 1730: && Objects.equals(getKey(), e.getKey()) >> 1731: // Invoke `getValue()` as late as possible to >> avoid evaluation >> 1732: && Objects.equals(getValue(), e.getValue()); > > Suggestion: > > && Objects.equals(e.getValue(), getValue()); > > You already integrated and it's probably not that important, but this would > additionally avoid evaluation if `e.getValue()` throws. This is in the realms of microoptimization now... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25004#discussion_r2087007810