On Wed, 8 May 2024 09:40:38 GMT, Alan Bateman <al...@openjdk.org> wrote:
> JEP 481 proposes Scoped Values to continue to preview in JDK 23 with one > change. The type of the operation parameter of the callWhere method is > changed to a new functional interface to avoid having the API throw > Exception. With that change, the getWhere (and the corresponding method on > Carrier) are no longer needed. The functional interface is not proposed for > j.u.function at this time. src/java.base/share/classes/java/lang/ScopedValue.java line 500: > 498: @PreviewFeature(feature = PreviewFeature.Feature.SCOPED_VALUES) > 499: @FunctionalInterface > 500: public interface CallableOp<T, X extends Throwable> { I feel like that a functional interface such as this one should be promoted to a top‑level type in some common package by the time this feature exits preview. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19136#discussion_r1596041552