Skip to content

Commit

Permalink
errorprone :: FutureReturnValueIgnored (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb authored Sep 21, 2024
1 parent 5dcd94a commit 4a8688b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class Kill extends Action {
@Override
public void trigger(Map<String, Sentinel.Tracker> trackers) {
logger.error("Sentinel detected unrecoverable agents, initiating forceful shutdown -- {}", format(trackers));
CompletableFuture.runAsync(EmissaryServer::stopServerForce);
var unused = CompletableFuture.runAsync(EmissaryServer::stopServerForce);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class Stop extends Action {
@Override
public void trigger(Map<String, Sentinel.Tracker> trackers) {
logger.error("Sentinel detected unrecoverable agents, initiating graceful shutdown -- {}", format(trackers));
CompletableFuture.runAsync(EmissaryServer::stopServer);
var unused = CompletableFuture.runAsync(EmissaryServer::stopServer);
}
}
4 changes: 2 additions & 2 deletions src/main/java/emissary/kff/KffMemcached.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public boolean check(String id, ChecksumResults sums) throws Exception {
if (!((String) result).equals(id)) {
// As long as the id is not the same as what was already stored, then
// store it on its own
client.set(id, ageoff, key);
var unused = client.set(id, ageoff, key);
// logger.debug("Storing duplicate Id: {} with value (hash) {}", id, key);
}
}
Expand All @@ -256,7 +256,7 @@ public boolean check(String id, ChecksumResults sums) throws Exception {
}
// logger.debug("Did not find key: {}", key);
// Did not find the key...store it and move on
client.set(key, ageoff, id);
var unused = client.set(key, ageoff, id);
return false;


Expand Down
2 changes: 1 addition & 1 deletion src/main/java/emissary/roll/RollManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public final void addRoller(Roller r) {
if (log.isInfoEnabled()) {
log.info("Scheduling Rollable {} at {} {}", r.getRollable().getClass(), r.getPeriod(), r.getTimeUnit().name());
}
exec.scheduleAtFixedRate(r, r.getPeriod(), r.getPeriod(), r.getTimeUnit());
var unused = exec.scheduleAtFixedRate(r, r.getPeriod(), r.getPeriod(), r.getTimeUnit());
}
if (progress) {
r.addPropertyChangeListener(this);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/emissary/util/io/LoggingPrintStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void print(final String string) {
if (linesToSkip == 0) {
final Map<String, String> mdcContextMap = MDC.getCopyOfContextMap();

executorService.submit(() -> log(logger, mdcContextMap, level, NORMAL_LOG_FORMAT, streamName, string));
var unused = executorService.submit(() -> log(logger, mdcContextMap, level, NORMAL_LOG_FORMAT, streamName, string));
}

super.print(string);
Expand Down Expand Up @@ -152,7 +152,7 @@ public void println(final Object object) {

final Map<String, String> mdcContextMap = MDC.getCopyOfContextMap();

executorService.submit(() -> log(logger, mdcContextMap, level, THROWABLE_LOG_FORMAT, streamName, throwable));
var unused = executorService.submit(() -> log(logger, mdcContextMap, level, THROWABLE_LOG_FORMAT, streamName, throwable));
}

super.println(object);
Expand Down

0 comments on commit 4a8688b

Please sign in to comment.