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

New Map extension #67

Merged
merged 7 commits into from
Jun 29, 2021
Merged

New Map extension #67

merged 7 commits into from
Jun 29, 2021

Conversation

JanSchankin
Copy link
Contributor

  • Maps with primitve wrapper types as keys can now be persisted

+ BeanConverterExtensions use Types instead of Classes to be able to acces generic type parameters
+ PersistentBeanConverter is now sent to all BeanConverterExtensions for recursive conversions. Otherwise registered Extensions would be lost if an Extensions creates a new PersistentBeanConverter.
+ Fallback for unserializable special Collections
+Refactoring of the BeanConverterExtension as a result of the tests
+Bugfixes
+Bugfixes
@JanSchankin JanSchankin changed the title Map feature New Map extension Jun 19, 2021
Copy link
Contributor

@rcschrg rcschrg left a comment

Choose a reason for hiding this comment

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

I like the change of the API for the extensions, but we might want some simpler APIs for common use cases in the future, but thats another issue I guess.

})
.forEach(pair -> valueMap.put(pair[0], pair[1]));

return (T) valueMap;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a conventional for each would be more readable, multi-line lambda + entryMap stream is too much in my opinion.

return new Object[]{key, value};
})
.forEach(pair -> convertedMap.put(pair[0], pair[1]));

Copy link
Contributor

Choose a reason for hiding this comment

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

same as below

…ary foreach instead of a Stream, since this leads to cleaner code.
@sonarcloud
Copy link

sonarcloud bot commented Jun 28, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.8% 94.8% Coverage
0.0% 0.0% Duplication

@JanSchankin
Copy link
Contributor Author

I like the change of the API for the extensions, but we might want some simpler APIs for common use cases in the future, but thats another issue I guess.

I've created an issue for that (#69).

@JanSchankin JanSchankin merged commit 5ff22ec into dev Jun 29, 2021
@JanSchankin JanSchankin deleted the map-feature branch December 5, 2021 12:34
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.

None yet

2 participants