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

feat(impl):[#359] update registry impl for lookup #829

Merged
merged 11 commits into from
Mar 27, 2024

Conversation

ds-ext-kmassalski
Copy link

@ds-ext-kmassalski ds-ext-kmassalski commented Mar 22, 2024

@dsmf dsmf self-requested a review March 27, 2024 10:56
Copy link

@dsmf dsmf left a comment

Choose a reason for hiding this comment

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

see comments

return Base64.getEncoder().encodeToString(serialize(globalAssetId));
}

private static byte[] serialize(final IdentifierKeyValuePair assetIds) {
Copy link

Choose a reason for hiding this comment

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

This serialization code is duplicated in several places now. My suggestion would be to extract this to a SerializationHelper class and also write a test for it. Then it can safely be reused in every place where it is needed.

Copy link
Author

Choose a reason for hiding this comment

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

Done

mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
WRITER = mapper.writer();
}

Copy link

Choose a reason for hiding this comment

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

if the serialization code is extracted to a SerializationHelper (see comment further above, the DecentralDigitalTwinRegistryClient stays cleaner because lines 57 to 64 could be removed here.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@catenax-ng catenax-ng deleted a comment from github-actions bot Mar 27, 2024
Copy link

@ds-ext-kmassalski ds-ext-kmassalski requested a review from dsmf March 27, 2024 14:21
@dsmf dsmf merged commit 338fce3 into main Mar 27, 2024
@dsmf dsmf deleted the feature/359-registry-update-impl-for-lookup branch March 27, 2024 15:49
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.

3 participants