RFR: 8361300: Document exceptions for Unsafe offset methods [v7]
ExE Boss
duke at openjdk.org
Sat Aug 2 12:04:57 UTC 2025
On Fri, 1 Aug 2025 20:13:45 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 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.
“Field Foo.bar not found” is a valid sentence, but “Field Foo.baz a static field” is not.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25945#discussion_r2249224597
More information about the core-libs-dev
mailing list