From 92d3afde43b24d8a4e586de37a55a79249387b49 Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Fri, 20 Sep 2019 14:20:48 +0000 Subject: [PATCH 1/4] Excavator: Upgrades Baseline to the latest version --- .baseline/checkstyle/checkstyle-suppressions.xml | 5 ++--- .baseline/checkstyle/checkstyle.xml | 14 ++++++++++---- build.gradle | 2 +- .../com/palantir/docker/proxy/DockerProxyRule.java | 2 +- .../palantir/docker/proxy/DockerProxySelector.java | 3 +-- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.baseline/checkstyle/checkstyle-suppressions.xml b/.baseline/checkstyle/checkstyle-suppressions.xml index 16adf10b..c0f855b1 100644 --- a/.baseline/checkstyle/checkstyle-suppressions.xml +++ b/.baseline/checkstyle/checkstyle-suppressions.xml @@ -1,8 +1,7 @@ - + "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" + "https://checkstyle.org/dtds/suppressions_1_2.dtd"> diff --git a/.baseline/checkstyle/checkstyle.xml b/.baseline/checkstyle/checkstyle.xml index c51899c4..f541b63e 100644 --- a/.baseline/checkstyle/checkstyle.xml +++ b/.baseline/checkstyle/checkstyle.xml @@ -1,7 +1,7 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> + + + + @@ -417,6 +422,7 @@ + @@ -430,7 +436,7 @@ - + @@ -463,7 +469,7 @@ - + diff --git a/build.gradle b/build.gradle index d87b11e9..992181a4 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.9.2' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'com.netflix.nebula:nebula-publishing-plugin:9.4.1' - classpath 'com.palantir.baseline:gradle-baseline-java:0.50.0' + classpath 'com.palantir.baseline:gradle-baseline-java:2.9.2' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.11.0' classpath 'gradle.plugin.com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.2.0' classpath 'gradle.plugin.org.inferred:gradle-processors:2.1.0' diff --git a/src/main/java/com/palantir/docker/proxy/DockerProxyRule.java b/src/main/java/com/palantir/docker/proxy/DockerProxyRule.java index 227ca965..888f56ff 100644 --- a/src/main/java/com/palantir/docker/proxy/DockerProxyRule.java +++ b/src/main/java/com/palantir/docker/proxy/DockerProxyRule.java @@ -196,7 +196,7 @@ private static class ForwardingNameServiceHandler implements InvocationHandler { } @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + public Object invoke(Object _proxy, Method method, Object[] args) throws Throwable { try { return callAndUnwrap(delegate, method, args); } catch (UnknownHostException e) { diff --git a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java index f4ed4c98..e6f1f4f2 100644 --- a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java +++ b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java @@ -4,7 +4,6 @@ package com.palantir.docker.proxy; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.palantir.docker.compose.connection.Cluster; import java.io.IOException; @@ -43,7 +42,7 @@ public List select(URI uri) { @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { - Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call"); + com.palantir.logsafe.Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call"); delegate.connectFailed(uri, sa, ioe); } } From ab8a2861219dea41442f7b2df2447f8258fdf11f Mon Sep 17 00:00:00 2001 From: Felix de Souza Date: Fri, 20 Sep 2019 15:48:03 +0100 Subject: [PATCH 2/4] Fix checkstyle --- .../java/com/palantir/docker/proxy/DockerProxySelector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java index e6f1f4f2..0a8b2440 100644 --- a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java +++ b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java @@ -42,7 +42,9 @@ public List select(URI uri) { @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { - com.palantir.logsafe.Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call"); + com.palantir.logsafe.Preconditions.checkArgument( + uri != null && sa != null && ioe != null, + "Invalid connectFailed call"); delegate.connectFailed(uri, sa, ioe); } } From 2dbc2457925bc680b9aa9f05841d15ffceb4fbd2 Mon Sep 17 00:00:00 2001 From: Felix de Souza Date: Fri, 20 Sep 2019 15:52:54 +0100 Subject: [PATCH 3/4] Fix checkstyle again --- .../java/com/palantir/docker/proxy/DockerProxySelector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java index 372c3590..915de7f1 100644 --- a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java +++ b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java @@ -45,8 +45,8 @@ public List select(URI uri) { @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { com.palantir.logsafe.Preconditions.checkArgument( - uri != null && sa != null && ioe != null, - "Invalid connectFailed call"); + uri != null && sa != null && ioe != null, + "Invalid connectFailed call"); delegate.connectFailed(uri, sa, ioe); } } From 3a0877db55779fd34a24d2ba4d7e3390b3024d18 Mon Sep 17 00:00:00 2001 From: Felix de Souza Date: Fri, 20 Sep 2019 16:00:30 +0100 Subject: [PATCH 4/4] fix import --- .../java/com/palantir/docker/proxy/DockerProxySelector.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java index 915de7f1..d0233264 100644 --- a/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java +++ b/src/main/java/com/palantir/docker/proxy/DockerProxySelector.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; import com.palantir.docker.compose.connection.Cluster; +import com.palantir.logsafe.Preconditions; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Proxy; @@ -44,9 +45,7 @@ public List select(URI uri) { @Override public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { - com.palantir.logsafe.Preconditions.checkArgument( - uri != null && sa != null && ioe != null, - "Invalid connectFailed call"); + Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call"); delegate.connectFailed(uri, sa, ioe); } }