Assign unused Future return value to a variable Error Prone plans to make this pattern into a compile error; this avoids future breakage. Change-Id: I6a023f22f472941854a6729f6450b9b70a020069
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java index 24c9336..1a80875 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java +++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/RefUpdateListener.java
@@ -86,7 +86,8 @@ } }; if (async) { - workQueue.getDefaultQueue().submit(task); + @SuppressWarnings("unused") // No assurance this completes. + Future<?> possiblyIgnoredError = workQueue.getDefaultQueue().submit(task); } else { task.run(); }