mongo-java-driver
mongo-java-driver copied to clipboard
Fix type parameters not being passed to fallback property codec
For some reason, type parameters weren't passed to fallback property codec, which caused an exception when trying to access them. Now, this issue is fixed.
@rozza , I am not sure about the validity of the code changes proposed. For one thing, it breaks 6 unit testing cases; secondly it seems FallbackPropertyCodecProvider opted for calling CodecRegistry#get(Type) intentionally, for the reason that the other get(Type, List<Type>() might not be overridden, thus defeating the purpose of fallback as the last resort.
How do you think?
@GliczDev looks like this PR needs some tests and as @NathanQingyangXu mentioned this does appear to break some existing test cases.
To run the bson tests and checks run ./gradlew bson:check from the shell.
It would also be good to add a regression test where this code path is used.
@rozza I'm sorry, I'm not familiar with mongo-java-driver project structure and tests really. Could you point me where I should add things?