RFR: 8275338: Add JFR events for notable serialization situations [v4]

Roger Riggs rriggs at openjdk.org
Wed Jan 10 17:05:29 UTC 2024


On Tue, 19 Dec 2023 15:58:10 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java line 185:
>> 
>>> 183:             commitEvent(PRIV_METH_NON_STATIC,
>>> 184:                     m + " must be non-static to be effective");
>>> 185:         }
>> 
>> Should there also be a check to see if this `private` method is (misdeclared) as a `native` method?
>
> I'm not sure that a `native` method is not considered effective by serialization. I have to check.

The spec is silent about methods being 'native'; it would generally be impractical to implement native methods for these purposes, but a native method can implement the behavior.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1447665831


More information about the core-libs-dev mailing list