Skip to content

[refactor] Use Collections.emptyMap() instead of new HashMap<>() for better code quality#10152

Open
Senrian wants to merge 1 commit intoapache:developfrom
Senrian:refactor/collections-emptymap-v1
Open

[refactor] Use Collections.emptyMap() instead of new HashMap<>() for better code quality#10152
Senrian wants to merge 1 commit intoapache:developfrom
Senrian:refactor/collections-emptymap-v1

Conversation

@Senrian
Copy link

@Senrian Senrian commented Mar 3, 2026

Replace empty map instantiations with Collections.emptyMap() which is:

  • More readable and intentional
  • Immutable and safer
  • Slightly more performant

Signed-off-by: Senrian

…etter code quality

Replace empty map instantiations with Collections.emptyMap() which is:
- More readable and intentional
- Immutable and safer
- Slightly more performant

Signed-off-by: Senrian
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.

1 participant