Skip to content

Commit

Permalink
Fixing an issue in ArrayList
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Jan 23, 2025
1 parent 9d9d5cc commit c8254c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void updateSplitMetadataForChildShards(int sourceShardId, Set<Integer> ne
}

List<ShardRange> shardsUnderRoot = rootShardsToAllChildren[shardRangeTuple.v1()] == null ? new ArrayList<>() :
Arrays.asList(rootShardsToAllChildren[shardRangeTuple.v1()]);
new ArrayList<>(Arrays.asList(rootShardsToAllChildren[shardRangeTuple.v1()]));
shardsUnderRoot.remove(shardRangeTuple.v2());
shardsUnderRoot.addAll(Arrays.asList(parentToChildShards.get(sourceShardId)));
ShardRange[] newShardsUnderRoot = shardsUnderRoot.toArray(new ShardRange[0]);
Expand Down

0 comments on commit c8254c6

Please sign in to comment.