ComputedConstant.ofEmpty() javadoc has a reference to a method that does not exist
Hi Per, in the javadoc referenced by the JEP, the doc of ofEmpty() has the following snippet of code private static final ComputedConstant<Foo> FOO = ComputedConstant.ofEmpty(); public Foo theBar() { // Foo is lazily constructed and recorded here upon first invocation return FOO.computeIfUnbound(Foo::new); } I was not able to find a description of the method computeIfUnbound ? regards, Rémi
I am pretty sure that computeIfUnbound is an old version of this method. https://cr.openjdk.org/~pminborg/computed-constant/api/java.base/java/util/c...) On Fri, Jul 28, 2023 at 8:28 AM Remi Forax <forax@univ-mlv.fr> wrote:
Hi Per, in the javadoc referenced by the JEP, the doc of ofEmpty() has the following snippet of code
private static final ComputedConstant<Foo> FOO = ComputedConstant.ofEmpty();
public Foo theBar() { // Foo is lazily constructed and recorded here upon first invocation return FOO.computeIfUnbound(Foo::new); }
I was not able to find a description of the method computeIfUnbound ?
regards, Rémi
participants (2)
-
David Alayachew
-
Remi Forax