Skip to content

Commit

Permalink
[#2370] Improvement: Fix the warning: [unchecked] unchecked call to a…
Browse files Browse the repository at this point in the history
…dd(E) as a member of the raw type List (#2371)

### What changes were proposed in this pull request?
Fix the warning: [unchecked] unchecked call to add(E) as a member of the raw type List

### Why are the changes needed?
Fix: #2370

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
<img width="1382" alt="image" src="https://github.com/user-attachments/assets/e2c9aab9-d936-42ee-9540-26a789c84a07" />
  • Loading branch information
cchung100m authored Mar 3, 2025
1 parent ea3ec58 commit 413c852
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public static synchronized void register(String key, ReconfigureListener listene
* @param listener the given property listener
*/
public static synchronized void register(Set<String> keys, ReconfigureListener listener) {
List listenerList = LISTENER_MAP.computeIfAbsent(keys, k -> new ArrayList<>());
List<ReconfigureListener> listenerList =
LISTENER_MAP.computeIfAbsent(keys, k -> new ArrayList<>());
listenerList.add(listener);
}

Expand Down

0 comments on commit 413c852

Please sign in to comment.