Error Prone: Enable and fix FutureReturnValueIgnored

Change-Id: I7d119d05fdcea1ce13aca4a4f8ec9e172e5b98a3
This commit is contained in:
Dave Borowitz
2019-05-24 10:42:22 -07:00
committed by David Pursehouse
parent 0c5fdd70b1
commit ef04f0e6ce
2 changed files with 13 additions and 9 deletions

View File

@@ -14,6 +14,8 @@
package com.google.gerrit.elasticsearch; package com.google.gerrit.elasticsearch;
import static java.util.concurrent.TimeUnit.MINUTES;
import com.google.gerrit.elasticsearch.ElasticTestUtils.ElasticNodeInfo; import com.google.gerrit.elasticsearch.ElasticTestUtils.ElasticNodeInfo;
import com.google.gerrit.server.query.change.AbstractQueryChangesTest; import com.google.gerrit.server.query.change.AbstractQueryChangesTest;
import com.google.gerrit.testing.ConfigSuite; import com.google.gerrit.testing.ConfigSuite;
@@ -65,14 +67,16 @@ public class ElasticV7QueryChangesTest extends AbstractQueryChangesTest {
@Rule public final GerritTestName testName = new GerritTestName(); @Rule public final GerritTestName testName = new GerritTestName();
@After @After
public void closeIndex() { public void closeIndex() throws Exception {
client.execute( client
new HttpPost( .execute(
String.format( new HttpPost(
"http://localhost:%d/%s*/_close", String.format(
nodeInfo.port, testName.getSanitizedMethodName())), "http://localhost:%d/%s*/_close",
HttpClientContext.create(), nodeInfo.port, testName.getSanitizedMethodName())),
null); HttpClientContext.create(),
null)
.get(5, MINUTES);
} }
@Override @Override

View File

@@ -59,7 +59,7 @@ java_package_configuration(
"-Xep:FragmentInjection:ERROR", "-Xep:FragmentInjection:ERROR",
"-Xep:FragmentNotInstantiable:ERROR", "-Xep:FragmentNotInstantiable:ERROR",
"-Xep:FunctionalInterfaceClash:ERROR", "-Xep:FunctionalInterfaceClash:ERROR",
#"-Xep:FutureReturnValueIgnored:ERROR", "-Xep:FutureReturnValueIgnored:ERROR",
#"-Xep:GetClassOnEnum:ERROR", #"-Xep:GetClassOnEnum:ERROR",
"-Xep:ImmutableAnnotationChecker:ERROR", "-Xep:ImmutableAnnotationChecker:ERROR",
#"-Xep:ImmutableEnumChecker:ERROR", #"-Xep:ImmutableEnumChecker:ERROR",