On Tue, 19 Dec 2023 15:58:10 GMT, Raffaello Giulietti <rgiulie...@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

Reply via email to