jborgers/PMD-jPinpoint-rules

Fix Request Avoid using ExecutorService::invokeAll or invokeAny without a timeout - sometimes a false positive

Closed this issue · 0 comments

Sometimes the rule "Avoid using ExecutorService::invokeAll or invokeAny without a timeout." is a false positive (see below sample with newly added timeout)

        result = forkJoinPool.invokeAll(
                        on.stream().map(value -> apply(toDo, value)).toList(), 300000, TimeUnit.SECONDS
                ).stream()
                .map(ParallelizationUtils::getListItem)
                .toList();