On Wed, 4 Jan 2023 20:06:51 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> In general, no, because of the possibility of `new Boolean` so it will 
>> depend on the code in `scan`. I'll investigate.
>
> You are correct. I keep forgetting about those now-deprecated-for-removal 
> constructors for `java.lang.Boolean`.
> 
> What you have now is good. Alternatively, you could use 
> `Boolean.TRUE.equals(b)`, a Yoda condition, which you might or might not find 
> aesthetically pleasing.

Like you I believe, Yoda conditions confusing I find.

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

PR: https://git.openjdk.org/jdk/pull/11701

Reply via email to