-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: POJO
Update: the Parameterizable interface was replaced with CodecProvider.get(Class<T> clazz, List<Type> typeArguments, CodecRegistry registry).
The Parameterizable interface was introduced along with RecordCodec to allow it to be deeply immutable even in the face of type parameters. We can make PojoCodec similarly immutable by having it make use of this interface. There are a few aspects to this
- PojoCodec implements Parameterizable
- PojoCodec uses CodecRegistry#get(java.lang.Class<T>, java.util.List<java.lang.reflect.Type>) to resolve codecs for parameterized POJO types, including nested POJOs and collections. Doing this for collections may be tricky since a different mechanism was introduced in
JAVA-2554that may conflict with this effort.
The end result should be that the full set of parameterized codecs is resolved before the codec is ever used for encoding or decoding.
- is related to
-
JAVA-5173 "Top level classes with generic types are not supported by the PojoCodec." Should not be unsupported
- Closed
- related to
-
JAVA-2554 Investigate Optional support for the Pojo Codec
- Closed
- split to
-
JAVA-4967 Deprecate Parameterizable, introduce default CodecProvider.get(Class<T>, List<Type>, CodecRegistry) instead
- Closed