Conceptually what you describe sounds like a good approach to explore.

Another approach worth exploring is to see whether this can be done without API change, using the existing API. I took a (very quick) look and didn't see anything that would preclude fixing this using the existing API, nor does the specification (javadoc-generated API docs) mandate the current behavior of eagerly evaluating both the "then" and "otherwise" conditions. Since it was only a quick look, I can't be sure.

-- Kevin


Nir Lisker wrote:
Hello,

I've proposed to work on a public API for binding.When that adds
capabilities for dynamic evaluation of the 'then' and 'otherwise'
arguments. Any comments?

https://bugs.openjdk.java.net/browse/JDK-8199560

- Nir

Reply via email to