Merge "Assign unused Future return value to a variable"

* submodules:
* Update plugins/reviewnotes from branch 'master'
  - 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
This commit is contained in:
Dave Borowitz
2017-02-08 13:58:39 +00:00
committed by Gerrit Code Review
20 changed files with 161 additions and 104 deletions

View File

@@ -31,6 +31,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.concurrent.Future;
import java.util.zip.GZIPOutputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -63,9 +64,12 @@ public class LogFileCompressor implements Runnable {
ZoneId zone = ZoneId.systemDefault();
LocalDate now = LocalDate.now(zone);
long milliSecondsUntil11pm = now.atStartOfDay(zone).plusHours(23).toInstant().toEpochMilli();
queue
.getDefaultQueue()
.scheduleAtFixedRate(compressor, milliSecondsUntil11pm, HOURS.toMillis(24), MILLISECONDS);
@SuppressWarnings("unused")
Future<?> possiblyIgnoredError =
queue
.getDefaultQueue()
.scheduleAtFixedRate(
compressor, milliSecondsUntil11pm, HOURS.toMillis(24), MILLISECONDS);
}
@Override