RFR: 8361300: Document exceptions for Unsafe offset methods [v7]

Chen Liang liach at openjdk.org
Fri Aug 1 20:15:58 UTC 2025


On Fri, 1 Aug 2025 18:43:04 GMT, ExE Boss <duke at openjdk.org> wrote:

>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Test update advised by volkan
>
> src/java.base/share/classes/jdk/internal/misc/Unsafe.java line 1108:
> 
>> 1106:         if (result < 0) {
>> 1107:             String type = switch ((int) result) {
>> 1108:                 case -2 -> "a static field";
> 
> Suggestion:
> 
>                 case -2 -> "is a static field";

To be picky, "not found" should be "is not found" too. I intentionally omitted "is" from both fragments to make it more simple.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25945#discussion_r2248796912


More information about the core-libs-dev mailing list