Skip to content

Commit

Permalink
refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
mynecker committed Oct 17, 2024
1 parent 3a78578 commit cb4716a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public String scan(ScanRequestBO scanRequestBO) {
).stream()
.findFirst()
.orElseThrow())
.collect(Collectors.toUnmodifiableList());
.toList();

List<String> brokerScanTypes = scanRequestBO.getScanTypes();
List<RouteBundle> routes = brokerScanTypes.stream()
Expand All @@ -110,9 +110,8 @@ public String scan(ScanRequestBO scanRequestBO) {
brokerScanType, e.getKey()))
.filter(Objects::nonNull)
.filter(list -> !list.isEmpty())
.collect(Collectors.toList()).stream()
)
.collect(Collectors.toList()).stream().flatMap(List::stream).collect(Collectors.toList());
.toList().stream()
).toList().stream().flatMap(List::stream).toList();

return scanService.singleScan(routes, groupId, scanId, traceId, actorId, messagingServiceEntity, runtimeAgentId);
}
Expand Down

0 comments on commit cb4716a

Please sign in to comment.