On Tue, 9 Jan 2024 10:41:31 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
>> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java >> line 53: >> >>> 51: private static final Class<?>[] READ_OBJECT_NO_DATA_PARAM_TYPES = >>> {}; >>> 52: private static final Class<?>[] WRITE_REPLACE_PARAM_TYPES = {}; >>> 53: private static final Class<?>[] READ_RESOLVE_PARAM_TYPES = {}; >> >> These could share a single zero length Class<?> array. > > Conceptually, these are independent types. There's no logical relationship > between them. Sharing a zero length array would convey a false sense of > logical sharing. true, but its wasted space and IMHO ok as a local and private implementation detail. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1447655018