RFR: 8275338: Add JFR events for notable serialization situations [v13]
Roger Riggs
rriggs at openjdk.org
Wed Jan 10 17:05:26 UTC 2024
On Wed, 10 Jan 2024 15:43:46 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> Adds serialization misdeclaration events to JFR.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
>
> Changes according to reviewers feedback.
src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java line 129:
> 127: Object spf = objectFromStatic(f);
> 128: if (spf == null) {
> 129: commitEvent(cl, SERIAL_PERSISTENT_FIELDS_NAME + " must be non-null");
"must" -> "should".
The [serialization spec](https://docs.oracle.com/en/java/javase/21/docs/specs/serialization/serial-arch.html#defining-serializable-fields-for-a-class) describes the behavior if the field is null.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1447662278
More information about the core-libs-dev
mailing list