Details
-
Epic
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Support Java Records
-
Docs Required, Release Notes Required
Description
Records, which were introduced in Java 16, provide a compelling alternative to POJOs for data-carrying purposes. They significantly reduce boilerplate and in general, provide a better developer experience.
As a result, Ignite 3 should support records on their main public APIs.
The biggest barriers I found in our codebase for supporting records are:
- Strict requirement for default constructors in our models/data carrier classes.
- A slight misalignment in the policy for instantiating these classes. PojoMarshaller first creates the instances and then injects the fields, which should be the opposite for records.
They seem pretty simple to overcome.