RFR: 8372146: Follow-up changes to the Lazy Constants JEP

Per Minborg pminborg at openjdk.org
Thu Nov 20 09:14:28 UTC 2025


On Thu, 20 Nov 2025 09:01:35 GMT, Per Minborg <pminborg at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/LazyConstant.java line 245:
>> 
>>> 243: 
>>> 244:     /**
>>> 245:      * {@return if this lazy constant is the same instance as the provided {@code obj}}
>> 
>> Suggestion:
>> 
>>      * {@return {@code true} if this lazy constant is the same instance as the provided {@code obj}}
>
> Yes. This is JDK style. Personally, I like the shorter version better but will change.
> 
> If we do the change, the sentence does not say what is returned if they are not the same instance for example.

I have changed it so it will conform to e.g., `File` specification on predicates.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28388#discussion_r2545002502


More information about the core-libs-dev mailing list