Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Jun 23, 2023

Only support classes annotated as serializable.

JAVA-5035

Only support classes annotated as serializable.

JAVA-5035
@rozza
Copy link
Member Author

rozza commented Jun 23, 2023

This way we still support any explicitly declared classes that are Serializable.

The previous check for kClass.isSealed also picked up Java Sealed interfaces and would error.

Note: Java records didn't return true from the previous check (kClass.isData || kClass.isValue)

@rozza rozza requested a review from jyemin June 23, 2023 14:16
@rozza
Copy link
Member Author

rozza commented Jun 23, 2023

Other approaches check for the presence of the kotlin Metadata annotation. However, we only want @Serializable kotlin classes.

@rozza rozza closed this Jun 23, 2023
@rozza rozza reopened this Jun 23, 2023
@rozza rozza merged commit 6b6c3dd into mongodb:4.10.x Jun 23, 2023
@rozza rozza deleted the JAVA-5035 branch June 23, 2023 15:07
rozza added a commit to rozza/mongo-java-driver that referenced this pull request Jun 23, 2023
Only support classes annotated as serializable.

JAVA-5035
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants