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

fix: moving @Migration to java-sdk-protobuf #1780

Merged
merged 3 commits into from
Aug 29, 2023

Conversation

aludwiko
Copy link
Contributor

@aludwiko aludwiko commented Aug 29, 2023

reverting the code to the initial idea

@aludwiko aludwiko marked this pull request as ready for review August 29, 2023 11:11
@@ -163,9 +151,12 @@ public static <T> T decodeJson(Class<T> valueClass, Any any, Optional<? extends
} else {
try {
ByteString decodedBytes = ByteStringEncoding.decodePrimitiveBytes(any.getValue());
if (jacksonMigration.isPresent()) {
if (valueClass.getAnnotation(Migration.class) != null) {
JsonMigration migration = valueClass.getAnnotation(Migration.class)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how costly this is, but we can add a cache in the future.

Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Agree that it's also not great to move the annotation, but I think it's better than augment the public API.

@octonato octonato merged commit e40a450 into main Aug 29, 2023
67 checks passed
@octonato octonato deleted the moving-migration-to-java-proto branch August 29, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants