diff --git a/.baseline/checkstyle/checkstyle.xml b/.baseline/checkstyle/checkstyle.xml
index f541b63e2..43ec38a3a 100644
--- a/.baseline/checkstyle/checkstyle.xml
+++ b/.baseline/checkstyle/checkstyle.xml
@@ -84,11 +84,13 @@
+ org.apache.commons.lang3.Validate.*,
+ org.assertj.core.api.Assertions.*,
+ org.mockito.Mockito.*"/>
diff --git a/.baseline/spotless/eclipse.xml b/.baseline/spotless/eclipse.xml
index 7bf7de787..fe1fc71ea 100644
--- a/.baseline/spotless/eclipse.xml
+++ b/.baseline/spotless/eclipse.xml
@@ -92,6 +92,7 @@
+
diff --git a/build.gradle b/build.gradle
index 53ac48492..dc5e59fb8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,7 +9,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:gradle-dependency-lock-plugin:7.0.1'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
- classpath 'com.palantir.baseline:gradle-baseline-java:2.7.0'
+ classpath 'com.palantir.baseline:gradle-baseline-java:2.17.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
diff --git a/client-config/src/main/java/com/palantir/conjure/java/client/config/KeepAliveSslSocketFactory.java b/client-config/src/main/java/com/palantir/conjure/java/client/config/KeepAliveSslSocketFactory.java
index 92b709f7d..04d392ec9 100644
--- a/client-config/src/main/java/com/palantir/conjure/java/client/config/KeepAliveSslSocketFactory.java
+++ b/client-config/src/main/java/com/palantir/conjure/java/client/config/KeepAliveSslSocketFactory.java
@@ -46,6 +46,7 @@ Socket wrap(Socket socket) throws SocketException {
return socket;
}
+ @Override
public String toString() {
return "KeepAliveSslSocketFactory{delegate=" + delegate + '}';
}
diff --git a/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java b/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java
index 9fbe575ba..f7e3bb6d1 100644
--- a/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java
+++ b/client-config/src/test/java/com/palantir/conjure/java/client/config/ClientConfigurationsTest.java
@@ -101,7 +101,7 @@ public void meshProxy_maxRetriesMustBe0() throws Exception {
ClientConfiguration validConfig = ClientConfigurations.of(meshProxyServiceConfig(uris, 0));
assertThat(validConfig.meshProxy()).isEqualTo(Optional.of(HostAndPort.fromParts("localhost", 1234)));
- assertThat(validConfig.maxNumRetries()).isEqualTo(0);
+ assertThat(validConfig.maxNumRetries()).isZero();
}
@Test
diff --git a/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java b/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java
index dcba63720..714e3e5e3 100644
--- a/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java
+++ b/conjure-java-jackson-serialization/src/test/java/com/palantir/conjure/java/serialization/ObjectMappersTest.java
@@ -66,7 +66,7 @@ public void deserializeJdk8ModulePresentOptional() throws IOException {
@Test
public void deserializeJdk8ModuleAbsentOptional() throws IOException {
- assertThat(MAPPER.readValue("null", Optional.class)).isEqualTo(Optional.empty());
+ assertThat(MAPPER.readValue("null", Optional.class)).isNotPresent();
}
@Test
diff --git a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/NeverRetryingBackoffStrategy.java b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/NeverRetryingBackoffStrategy.java
index ed3909941..c66ade0ba 100644
--- a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/NeverRetryingBackoffStrategy.java
+++ b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/NeverRetryingBackoffStrategy.java
@@ -23,7 +23,7 @@ public enum NeverRetryingBackoffStrategy implements BackoffStrategy {
INSTANCE;
@Override
- public boolean backoff(int numFailedAttempts) {
+ public boolean backoff(int _numFailedAttempts) {
return false;
}
}
diff --git a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderEnrichmentContract.java b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderEnrichmentContract.java
index 9e567c122..25c6460fa 100644
--- a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderEnrichmentContract.java
+++ b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderEnrichmentContract.java
@@ -28,7 +28,7 @@ public PathTemplateHeaderEnrichmentContract(Contract delegate) {
}
@Override
- protected void processMetadata(Class> targetType, Method method, MethodMetadata metadata) {
+ protected void processMetadata(Class> _targetType, Method _method, MethodMetadata metadata) {
metadata.template()
.header(OkhttpTraceInterceptor.PATH_TEMPLATE_HEADER,
metadata.template().method() + " "
diff --git a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderRewriter.java b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderRewriter.java
index a2840640e..65d056e1a 100644
--- a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderRewriter.java
+++ b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/PathTemplateHeaderRewriter.java
@@ -28,7 +28,7 @@ public enum PathTemplateHeaderRewriter implements RequestInterceptor {
INSTANCE;
@Override
- public void apply(RequestTemplate template) {
+ public void apply(RequestTemplate _template) {
// nop
}
}
diff --git a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContract.java b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContract.java
index b02b07d83..eb0597ff8 100644
--- a/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContract.java
+++ b/conjure-java-jaxrs-client/src/main/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContract.java
@@ -30,7 +30,7 @@ public SlashEncodingContract(Contract delegate) {
}
@Override
- protected void processMetadata(Class> targetType, Method method, MethodMetadata metadata) {
+ protected void processMetadata(Class> _targetType, Method _method, MethodMetadata metadata) {
metadata.template().decodeSlash(false);
}
}
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientConfigRefreshTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientConfigRefreshTest.java
index 2eff3938e..aa1a9aa1f 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientConfigRefreshTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientConfigRefreshTest.java
@@ -50,13 +50,13 @@ public void testConfigRefresh() throws Exception {
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.string()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(1);
- assertThat(server2.getRequestCount()).isEqualTo(0);
+ assertThat(server2.getRequestCount()).isZero();
// Call 2
server1.enqueue(new MockResponse().setBody("\"server1\""));
assertThat(proxy.string()).isEqualTo("server1");
assertThat(server1.getRequestCount()).isEqualTo(2);
- assertThat(server2.getRequestCount()).isEqualTo(0);
+ assertThat(server2.getRequestCount()).isZero();
// Switch config
refreshableConfig.set(config2);
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientProxyConfigTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientProxyConfigTest.java
index 3d158246c..7575dcbf9 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientProxyConfigTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/JaxRsClientProxyConfigTest.java
@@ -89,13 +89,13 @@ public void testAuthenticatedProxy() throws Exception {
private static ProxySelector createProxySelector(String host, int port) {
return new ProxySelector() {
@Override
- public List select(URI uri) {
+ public List select(URI _uri) {
InetSocketAddress addr = new InetSocketAddress(host, port);
return ImmutableList.of(new Proxy(Proxy.Type.HTTP, addr));
}
@Override
- public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {}
+ public void connectFailed(URI _uri, SocketAddress _sa, IOException _ioe) {}
};
}
}
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/TracerTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/TracerTest.java
index 2432bd811..3643a2342 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/TracerTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/TracerTest.java
@@ -145,12 +145,12 @@ private void runTwoRequestsInParallel() {
ExecutorService executor = Executors.newFixedThreadPool(2);
CompletableFuture> first = CompletableFuture.runAsync(() -> {
Tracer.initTrace(Optional.of(true), "first");
- OpenSpan ignored = Tracer.startSpan("");
+ Tracer.startSpan("");
service.string();
}, executor);
CompletableFuture> second = CompletableFuture.runAsync(() -> {
Tracer.initTrace(Optional.of(true), "second");
- OpenSpan ignored = Tracer.startSpan("");
+ Tracer.startSpan("");
service.string();
}, executor);
first.join();
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaOptionalAwareDecoderTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaOptionalAwareDecoderTest.java
index 22b37b5a0..0a330b45e 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaOptionalAwareDecoderTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaOptionalAwareDecoderTest.java
@@ -66,7 +66,7 @@ public void testOptional() {
@Test
public void testNonOptional() {
assertThat(service.getNonOptional("something")).isEqualTo(ImmutableMap.of("something", "something"));
- assertThat(service.getNonOptional(null)).isEqualTo(ImmutableMap.of());
+ assertThat(service.getNonOptional(null)).isEmpty();
}
@Test
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaTestServer.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaTestServer.java
index 5986ccd96..7c6b0253b 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaTestServer.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/GuavaTestServer.java
@@ -43,7 +43,7 @@
public class GuavaTestServer extends Application {
@Override
- public final void run(Configuration config, final Environment env) throws Exception {
+ public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(ConjureJerseyFeature.INSTANCE);
env.jersey().register(new JacksonMessageBodyProvider(ObjectMappers.newServerObjectMapper()));
env.jersey().register(new TestResource());
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8OptionalAwareDecoderTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8OptionalAwareDecoderTest.java
index d87847015..732a25092 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8OptionalAwareDecoderTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8OptionalAwareDecoderTest.java
@@ -66,7 +66,7 @@ public void testOptional() {
@Test
public void testNonOptional() {
assertThat(service.getNonOptional("something")).isEqualTo(ImmutableMap.of("something", "something"));
- assertThat(service.getNonOptional(null)).isEqualTo(ImmutableMap.of());
+ assertThat(service.getNonOptional(null)).isEmpty();
}
@Test
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8TestServer.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8TestServer.java
index c8b2f84e7..763926abf 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8TestServer.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/Java8TestServer.java
@@ -51,7 +51,7 @@
public class Java8TestServer extends Application {
@Override
- public final void run(Configuration config, final Environment env) throws Exception {
+ public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(ConjureJerseyFeature.INSTANCE);
env.jersey().register(new JacksonMessageBodyProvider(ObjectMappers.newServerObjectMapper()));
env.jersey().register(new EmptyOptionalTo204ExceptionMapper());
@@ -61,7 +61,7 @@ public final void run(Configuration config, final Environment env) throws Except
@Provider
private static final class EmptyOptionalTo204ExceptionMapper implements ExceptionMapper {
@Override
- public Response toResponse(EmptyOptionalException exception) {
+ public Response toResponse(EmptyOptionalException _exception) {
return Response.noContent().build();
}
}
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/ServiceConfigTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/ServiceConfigTest.java
index 03fd51643..5dee87fb0 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/ServiceConfigTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/ServiceConfigTest.java
@@ -83,7 +83,7 @@ public void initialize(Bootstrap bootstrap) {
}
@Override
- public void run(ServiceConfigTestAppConfig configuration, Environment environment) throws Exception {
+ public void run(ServiceConfigTestAppConfig _configuration, Environment environment) throws Exception {
environment.jersey().register(new Resource());
}
diff --git a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContractTest.java b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContractTest.java
index e4a988087..c95ef708a 100644
--- a/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContractTest.java
+++ b/conjure-java-jaxrs-client/src/test/java/com/palantir/conjure/java/client/jaxrs/feignimpl/SlashEncodingContractTest.java
@@ -92,7 +92,7 @@ public interface Service {
public static class Server extends Application {
@Override
- public final void run(Configuration config, final Environment env) throws Exception {
+ public final void run(Configuration _config, final Environment env) throws Exception {
env.jersey().register(resource);
}
}
diff --git a/conjure-java-jersey-server/src/test/java/com/palantir/conjure/java/server/jersey/ExceptionMappingTest.java b/conjure-java-jersey-server/src/test/java/com/palantir/conjure/java/server/jersey/ExceptionMappingTest.java
index cab845328..1001b8b8a 100644
--- a/conjure-java-jersey-server/src/test/java/com/palantir/conjure/java/server/jersey/ExceptionMappingTest.java
+++ b/conjure-java-jersey-server/src/test/java/com/palantir/conjure/java/server/jersey/ExceptionMappingTest.java
@@ -140,9 +140,9 @@ public void testServiceException() throws IOException {
Map rawError =
ObjectMappers.newClientObjectMapper().readValue(body, new TypeReference