Skip to content

Support recursive types in parameterized records #1007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 15, 2022
Prev Previous commit
Next Next commit
Better error message
  • Loading branch information
jyemin committed Oct 15, 2022
commit bb406bce22345efb989a7f420d13d8440dbec7a0
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ public interface CodecRegistry extends CodecProvider {
* @since 4.8
*/
default <T> Codec<T> get(Class<T> clazz, List<Type> typeArguments) {
throw new CodecConfigurationException("Make this message really informative"); // TODO
throw new CodecConfigurationException("The application is configuring a codec for a parameterized class, but is using an "
+ "implementation of org.bson.codecs.configuration.CodecRegistry that does not override the default implementation of the"
+ "method get(java.lang.Class<T>, java.util.List<java.lang.reflect.Type>). This implementation should be replaced by one "
+ "that is obtained from one of the CodecRegistry builder methods in org.bson.codecs.configuration.CodecRegistries");
}
}