mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-26 12:00:56 +00:00
feature: added code refactoring changes for 2378 (#2379)
* fix:added code refactoring changes for 2378 * fix:added code refactoring changes for 2378 * build fix for 2378 * fix: updated pom.xml files for 2378 issue * fix:build fix for 2378 issue Co-authored-by: aparna <aparna@aparnas-MacBook-Air.local>
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@ public class SimpleProbabilisticThreatAwareSystem implements ProbabilisticThreat
|
||||
final Predicate<? super ProbableThreat> predicate) {
|
||||
return this.threats.stream()
|
||||
.filter(predicate)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
.toList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,8 +74,7 @@ public class SimpleThreatAwareSystem implements ThreatAwareSystem {
|
||||
|
||||
private List<Threat> filteredItems(Predicate<? super Threat> predicate) {
|
||||
return this.issues.stream()
|
||||
.filter(predicate)
|
||||
.collect(Collectors.toUnmodifiableList());
|
||||
.filter(predicate).toList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user