Skip to content

Fix raw type usage: replace Collections.EMPTY_LIST with Collections.emptyList()#766

Merged
Leomrlin merged 1 commit intoapache:masterfrom
SYaoJun:0304_empty_list
Mar 9, 2026
Merged

Fix raw type usage: replace Collections.EMPTY_LIST with Collections.emptyList()#766
Leomrlin merged 1 commit intoapache:masterfrom
SYaoJun:0304_empty_list

Conversation

@SYaoJun
Copy link
Contributor

@SYaoJun SYaoJun commented Mar 4, 2026

What changes were proposed in this pull request?

The code uses Collections.EMPTY_LIST which is a pre-generics raw type constant.
This causes unchecked conversion warnings and lacks type safety.

Replace with Collections.emptyList() which returns a properly typed
List<T> and eliminates compiler warnings.

How was this PR tested?

  • Tests have Added for the changes
  • Production environment verified

Copy link
Contributor

@Leomrlin Leomrlin left a comment

Choose a reason for hiding this comment

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

LGTM

@Leomrlin Leomrlin merged commit fb15622 into apache:master Mar 9, 2026
1 check passed
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.

2 participants