Skip to content

Commit 7cad484

Browse files
authored
[#2349] Improvement: Fix the warning: unchecked method invocation: method put in interface Map is applied to given types (#2352)
### What changes were proposed in this pull request? Fix the warning: unchecked method invocation: method put in interface Map is applied to given types ### Why are the changes needed? Fix: #2349 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? current UT <img width="1133" alt="image" src="https://github.com/user-attachments/assets/36935007-9cbf-4ef7-8af2-17b8a0f3269b" />
1 parent 7e63bde commit 7cad484

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

client/src/main/java/org/apache/uniffle/client/record/reader/RMRecordsReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ public int compare(K o1, K o2) {
194194

195195
public void start() {
196196
for (int partitionId : partitionIds) {
197-
mergeBuffers.put(partitionId, new Queue(maxBufferPerPartition));
197+
mergeBuffers.put(partitionId, new Queue<>(maxBufferPerPartition));
198198
if (this.combiner != null) {
199-
combineBuffers.put(partitionId, new Queue(maxBufferPerPartition));
199+
combineBuffers.put(partitionId, new Queue<>(maxBufferPerPartition));
200200
}
201201
RecordsFetcher fetcher = new RecordsFetcher(partitionId);
202202
fetcher.start();

integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ public void remoteMergeWriteReadTestMultiPartition(String classes) throws Except
641641
Map<Integer, Set<Long>> ptb = new HashMap<>();
642642
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
643643
final int partitionId = i;
644-
ptb.put(partitionId, new HashSet());
644+
ptb.put(partitionId, new HashSet<>());
645645
ptb.get(partitionId)
646646
.addAll(
647647
blocks1.stream()
@@ -854,7 +854,7 @@ public void remoteMergeWriteReadTestMultiPartitionWithCombine(String classes) th
854854
Map<Integer, Set<Long>> ptb = new HashMap<>();
855855
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
856856
final int partitionId = i;
857-
ptb.put(partitionId, new HashSet());
857+
ptb.put(partitionId, new HashSet<>());
858858
ptb.get(partitionId)
859859
.addAll(
860860
blocks1.stream()

integration-test/common/src/test/java/org/apache/uniffle/test/RemoteMergeShuffleWithRssClientTestWhenShuffleFlushed.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ public void remoteMergeWriteReadTestMultiPartition(String classes) throws Except
655655
Map<Integer, Set<Long>> ptb = new HashMap<>();
656656
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
657657
final int partitionId = i;
658-
ptb.put(partitionId, new HashSet());
658+
ptb.put(partitionId, new HashSet<>());
659659
ptb.get(partitionId)
660660
.addAll(
661661
blocks1.stream()
@@ -869,7 +869,7 @@ public void remoteMergeWriteReadTestMultiPartitionWithCombine(String classes) th
869869
Map<Integer, Set<Long>> ptb = new HashMap<>();
870870
for (int i = PARTITION_ID; i < PARTITION_ID + 3; i++) {
871871
final int partitionId = i;
872-
ptb.put(partitionId, new HashSet());
872+
ptb.put(partitionId, new HashSet<>());
873873
ptb.get(partitionId)
874874
.addAll(
875875
blocks1.stream()

0 commit comments

Comments
 (0)