kryo-parent-5.2.0
版本发布时间: 2021-07-31 23:22:21
EsotericSoftware/kryo最新发布版本:kryo-parent-5.6.0(2024-01-08 22:48:51)
This is a maintenance release coming with bug fixes and improvements.
#849 Fall back to getDeclaredConstructor for non-public records #848 Fix #847 Ensure that RecordSerializer can deal with subtypes #841 Fix #840 Ensure primitive types are assignable to Comparable/Serializables fields #839 Fix #838 Avoid flush repeatedly when has finished flushing #829 OSS-Fuzz Integration
The full list of changes can be found here.
Many thanks to all contributors!
Important Upgrade Information
This release fixes two critical issues with the serializer for java.util.Record
. One of the issues (#847) seriously limits the serializers practical usefulness, so we decided to make an exception and break serialization compatibility. If you have serialized records with non-final field types that you need to read with Kryo 5.2.0, you can enable backwards compatibility globally or for individual types (recommended):
- Register global default serializer:
final RecordSerializer<?> rs = new RecordSerializer<>();
rs.setFixedFieldTypes(true);
kryo.addDefaultSerializer(Record.class, rs);
- Register serializer per type:
final RecordSerializer<?> rs = new RecordSerializer<>();
rs.setFixedFieldTypes(true);
kryo.register(MyRecord.class, rs);
For migration from previous major versions please check out the migration guide. We're asking the community to help and contribute this part: please edit the migration wiki page as you encounter any information or issues that might help others.
Compatibility
1、 kryo-5.2.0-all.zip 2.19MB