You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While testing #847 I noticed that package private records cannot be deserialized.
To Reproduce
static record PackagePrivateRecord(int i, String s) {}
@Test
void testNonPublicRecords() {
kryo.register(PackagePrivateRecord.class);
roundTrip(4, new PackagePrivateRecord(1, "s1"));
}
This fails with:
Caused by: java.lang.NoSuchMethodException: com.esotericsoftware.kryo.serializers.RecordSerializerTest$PackagePrivateRecord.<init>(int,java.lang.String)
at java.base/java.lang.Class.getConstructor0(Class.java:3517)
at java.base/java.lang.Class.getConstructor(Class.java:2238)
at com.esotericsoftware.kryo.serializers.RecordSerializer.invokeCanonicalConstructor(RecordSerializer.java:224)
... 70 more
The text was updated successfully, but these errors were encountered:
Describe the bug
While testing #847 I noticed that package private records cannot be deserialized.
To Reproduce
This fails with:
The text was updated successfully, but these errors were encountered: