Skip to content

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.

…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]

@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.

2 participants