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

The TRUSTED_PACKAGES field in the DefaultJackson2JavaTypeMapper has also been improved to have an ImmutableList type. #2875

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

ch4570
Copy link
Contributor

@ch4570 ch4570 commented Nov 2, 2023

Improvements

  1. The Arrays.asList method creates a List based on variable arguments, which can lead to heap pollution, and TRUST_PACKAGES is an immutable field, so it has been improved to utilize Immutable List.

  2. Improved to call the empty method to clarify the intent, rather than directly comparing integers to see if the size of a Set is zero.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…avaTypeMapper class to a List.of method that returns an ImmutableList.
@ch4570 ch4570 changed the title Improved the immutable field TRUSTED_PACKAGES in the DefaultJackson2JavaTypeMapper class to a List.of method that returns an ImmutableList. Improved field TRUSTED_PACKAGES in the DefaultJackson2JavaTypeMapper returns an ImmutableList. Nov 2, 2023
@ch4570 ch4570 changed the title Improved field TRUSTED_PACKAGES in the DefaultJackson2JavaTypeMapper returns an ImmutableList. The TRUSTED_PACKAGES field in the DefaultJackson2JavaTypeMapper has also been improved to have an ImmutableList type. Nov 2, 2023
@artembilan artembilan added this to the 3.1.0 milestone Nov 2, 2023
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

> Task :spring-kafka:checkstyleMain FAILED
Error: eckstyle] [ERROR] /home/runner/work/spring-kafka/spring-kafka/spring-kafka/src/main/java/org/springframework/kafka/support/mapping/DefaultJackson2JavaTypeMapper.java:19:8: Unused import - java.util.Arrays. [UnusedImports]

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@artembilan artembilan merged commit 2362301 into spring-projects:main Nov 2, 2023
@artembilan
Copy link
Member

@ch4570 ,

thank you for contribution; looking forward for more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants