RFR: 8330465: Stable Values and Collections (Internal)

Per Minborg pminborg at openjdk.org
Tue May 14 14:14:25 UTC 2024


On Mon, 22 Apr 2024 09:34:39 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/lang/stable/StableValueElement.java line 116:
>> 
>>> 114:     public V computeIfUnset(Supplier<? extends V> supplier) {
>>> 115:         // Todo: This creates a lambda
>>> 116:         return computeIfUnsetShared(supplier, Supplier::get);
>> 
>> Suggestion:
>> 
>>         return computeIfUnsetShared(supplier, supplierExtractor());
>
> Yes. This is a work in progress. I will explore using a `BiFunction` instead.

I've converted to pattern matching instead.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18794#discussion_r1576155645


More information about the compiler-dev mailing list