From e0f6ce376036760645b1fc85c0f8500997e6d277 Mon Sep 17 00:00:00 2001 From: Matthias Jaros Date: Sat, 22 Aug 2026 12:43:16 +0200 Subject: Removed parameter because the variable is global in class. Renamed parameter to consumer instead of calllable --- src/main/java/com/it_jaros/jns/scan/engine/ConsumerThread.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/it_jaros/jns/scan/engine/ConsumerThread.java b/src/main/java/com/it_jaros/jns/scan/engine/ConsumerThread.java index 8bc7fdf..8f93317 100644 --- a/src/main/java/com/it_jaros/jns/scan/engine/ConsumerThread.java +++ b/src/main/java/com/it_jaros/jns/scan/engine/ConsumerThread.java @@ -23,15 +23,15 @@ public class ConsumerThread { * all results (also partial) collected for the consumer * with whatever is there already */ - public void runConsumerLoop(Consumer> callable) { + public void runConsumerLoop(Consumer> consumer) { while (!cancelledToken.isCancelled() && (state.running().get() || state.inPipeline().get() > 0)) { - callable.accept(getPollResult(state)); + consumer.accept(getPollResult()); } } - private PollState getPollResult(ProducerState state) { + private PollState getPollResult() { try { - return pollResult(state); + return pollResult(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -39,7 +39,7 @@ public class ConsumerThread { return new PollState.Unavailable<>(); } - private PollState pollResult(ProducerState state) throws InterruptedException { + private PollState pollResult() throws InterruptedException { Future future = state.completionService().poll(ProducerThread.pollInterval.toMillis(), TimeUnit.MILLISECONDS); if (future == null) { -- cgit v1.3.1