Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import org.bson.codecs.Codec;
import org.bson.codecs.configuration.CodecRegistry;

import java.lang.reflect.Type;

final class FallbackPropertyCodecProvider implements PropertyCodecProvider {
private final CodecRegistry codecRegistry;
private final PojoCodec<?> pojoCodec;
Expand All @@ -35,6 +37,6 @@ public <S> Codec<S> get(final TypeWithTypeParameters<S> type, final PropertyCode
if (clazz == pojoCodec.getEncoderClass()) {
return (Codec<S>) pojoCodec;
}
return codecRegistry.get(type.getType());
return codecRegistry.get(type.getType(), type.getTypeParameters().stream().<Type>map(TypeWithTypeParameters::getType).toList());
}
}