Require explicit modifiable list.
@@ -32,7 +32,8 @@ class FederationResult {
this.targetResults = targetResults;
if (targetResults.stream().anyMatch(TargetResult::isMandatory))
- targetsToWaitFor = targetResults.stream().filter(TargetResult::isMandatory).toList();
+ targetsToWaitFor = targetResults.stream().filter(TargetResult::isMandatory)
+ .collect(Collectors.toCollection(ArrayList::new));
else
targetsToWaitFor = new ArrayList<>(targetResults);
}
