RFR: 8364751: ConstantBootstraps.explicitCast contradictory specification for null-to-primitive [v3]

Chen Liang liach at openjdk.org
Fri Aug 29 13:37:24 UTC 2025


On Fri, 29 Aug 2025 10:22:11 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Update throws clause per CSR review
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into doc/constboot-cast
>>  - Update wording and rendering again
>>  - Merge branch 'master' of https://github.com/openjdk/jdk into doc/constboot-cast
>>  - Update and consolidate tests
>>  - 8364751: ConstantBootstraps.explicitCast violates doc contracts for null-to-int
>
> src/java.base/share/classes/java/lang/invoke/ConstantBootstraps.java line 414:
> 
>> 412:      * @return the converted value
>> 413:      * @throws ClassCastException when {@code dstType} is {@code void}; when
>> 414:      *         {@code dstType} is reference, and the reference cast fails; or
> 
> Suggestion:
> 
>      *         {@code dstType} is a reference type, and the reference cast fails; or

Thanks. Done, and updated the CSR changeset (no semantic change, don't think a re-review is necessary) and added a comment/

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26714#discussion_r2310179346


More information about the core-libs-dev mailing list