On Wed, 10 Jan 2024 15:43:46 GMT, Raffaello Giulietti <[email protected]>
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