Skip to content

Commit

Permalink
Fix sonar issue on ComputeNodeInstanceContext (#32788)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Sep 3, 2024
1 parent d3482e1 commit 54cfa5a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void deleteComputeNodeInstance(final ComputeNodeInstance instance) {
public Map<String, InstanceMetaData> getAllClusterInstances(final InstanceType instanceType, final Collection<String> labels) {
Map<String, InstanceMetaData> result = new LinkedHashMap<>(allClusterInstances.size(), 1F);
for (ComputeNodeInstance each : allClusterInstances) {
if (each.getMetaData().getType() == instanceType && labels.stream().anyMatch(((Collection<String>) each.getLabels())::contains)) {
if (each.getMetaData().getType() == instanceType && labels.stream().anyMatch(each.getLabels()::contains)) {
result.put(each.getMetaData().getId(), each.getMetaData());
}
}
Expand Down

0 comments on commit 54cfa5a

Please sign in to comment.