From b8a16ca3441b7f205c05d045cb8481551ebd9598 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Fri, 14 Apr 2023 17:08:57 -0400 Subject: [PATCH] don't ignore (useless) return value, make spotbugs happy --- .../io/cryostat/discovery/BuiltInDiscovery.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/cryostat/discovery/BuiltInDiscovery.java b/src/main/java/io/cryostat/discovery/BuiltInDiscovery.java index 0c6c477a87..92b78a5acc 100644 --- a/src/main/java/io/cryostat/discovery/BuiltInDiscovery.java +++ b/src/main/java/io/cryostat/discovery/BuiltInDiscovery.java @@ -44,6 +44,7 @@ import java.util.SortedSet; import java.util.UUID; import java.util.concurrent.ExecutorService; +import java.util.concurrent.Future; import java.util.function.Consumer; import java.util.stream.Stream; @@ -132,13 +133,15 @@ public void start(Promise start) { }); platform.addTargetDiscoveryListener( - tde -> - executor.submit( - () -> - storage.update( - id, - platform.getDiscoveryTree() - .getChildren()))); + tde -> { + Future f = + executor.submit( + () -> + storage.update( + id, + platform.getDiscoveryTree() + .getChildren())); + }); Promise promise = Promise.promise(); promise.future() .onSuccess(