Skip to content
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

UUIDSerializer: Cast to parent type to deserialize a UUID within a list #427

Merged
merged 1 commit into from
Nov 7, 2023

Commits on Nov 2, 2023

  1. UUIDSerializer: Change type cast to parent type to fix issues using w…

    …ithin a list.
    
    The UUIDSerializer's deserializer will fail with a `ClassCastException` when the UUID is embedded in a list (e.g., `val foo: Collection<@contextual UUID> = emptyList()`).  The decoder in this example is a `ListDecoder` rather than the expected `BsonFlexibleDecoder` triggering the exception.  Both, however, are `FlexibleDecoder` objects and the reader field is declared there.  Updated the cast to this parent type, resolving the issue.
    desilvai-target committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    adddd90 View commit details
    Browse the repository at this point in the history