Feedback on JEP 502: Stable Values (Preview)

Chen Liang liangchenblue at gmail.com
Wed Mar 26 09:02:18 UTC 2025


Hi David, what you suggested is already covered by StableValue.supplier.
You just need a Supplier instead of a micromanaged StableValue. StableValue
is a low level logic-free container but also has static methods for higher
level compositions, so it is easily confused like you did.

On Wed, Mar 26, 2025, 1:09 AM David Vidal Escudero <
david.vidal.escudero at gmail.com> wrote:

> Good day,
>
> I love this new feature, and it'll be really useful since I have lots of
> use cases at real work to try it on.
>
> However, I'd like to point out that a less verbose form of this feature
> would be to pass a Supplier in the StableValue.of method, something like:
>
> static final StableValue<OrderController> ORDERS =
>> StableValue.of(OrderController::new);
>
>
> Best regards, and thanks for your time.
>
> David Vidal.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20250326/e733413c/attachment.htm>


More information about the core-libs-dev mailing list