Skip to content

Commit 1a54513

Browse files
Excavator: Upgrades Baseline to the latest version
1 parent 8550027 commit 1a54513

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

.baseline/checkstyle/checkstyle-suppressions.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0"?>
2-
32
<!DOCTYPE suppressions PUBLIC
4-
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
5-
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
3+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
4+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
65

76
<!-- IMPORTANT ECLIPSE NOTE: If you change this file, you must restart Eclipse
87
for your changes to take effect in its Checkstyle integration. -->

.baseline/checkstyle/checkstyle.xml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4-
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
55

66
<!--
77
Palantir Baseline Checkstyle configuration.
@@ -127,6 +127,11 @@
127127
<property name="illegalPkgs" value="junit.framework"/>
128128
<message key="import.illegal" value="Use JUnit 4-style (org.junit.*) test classes and assertions instead of JUnit 3 (junit.framework.*)."/>
129129
</module>
130+
<module name="IllegalImport"> <!-- Only relevant for pre-Java 11 because javafx is gone completely in Java 11 -->
131+
<property name="id" value="BanJavafx"/>
132+
<property name="illegalPkgs" value="javafx"/>
133+
<message key="import.illegal" value="Must not import javafx classes because some OpenJDK builds do not include javafx."/>
134+
</module>
130135
<module name="IllegalImport"> <!-- Java Coding Guidelines: Import the canonical package -->
131136
<property name="illegalPkgs" value="org.elasticsearch.common.base, com.clearspring.analytics.util, org.spark_project.guava"/>
132137
<message key="import.illegal" value="Must not import repackaged classes."/>
@@ -417,6 +422,7 @@
417422
<property name="allowEmptyMethods" value="true"/>
418423
<property name="allowEmptyTypes" value="true"/>
419424
<property name="allowEmptyLoops" value="true"/>
425+
<property name="allowEmptyLambdas" value="true"/>
420426
<property name="ignoreEnhancedForColon" value="false"/>
421427
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
422428
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
@@ -430,7 +436,7 @@
430436
</module>
431437
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
432438
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
433-
<property name="ignoredAnnotations" value="Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
439+
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
434440
</module>
435441
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
436442
<property name="scope" value="public"/>

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ buildscript {
1313
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.9.2'
1414
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1515
classpath 'com.netflix.nebula:nebula-publishing-plugin:9.4.1'
16-
classpath 'com.palantir.baseline:gradle-baseline-java:0.50.0'
16+
classpath 'com.palantir.baseline:gradle-baseline-java:2.6.0'
1717
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.11.0'
1818
classpath 'gradle.plugin.com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.2.0'
1919
classpath 'gradle.plugin.org.inferred:gradle-processors:2.1.0'

src/main/java/com/palantir/docker/proxy/DockerProxySelector.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package com.palantir.docker.proxy;
66

7-
import com.google.common.base.Preconditions;
87
import com.google.common.collect.ImmutableList;
98
import com.palantir.docker.compose.connection.Cluster;
109
import java.io.IOException;
@@ -43,7 +42,7 @@ public List<Proxy> select(URI uri) {
4342

4443
@Override
4544
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
46-
Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call");
45+
com.palantir.logsafe.Preconditions.checkArgument(uri != null && sa != null && ioe != null, "Invalid connectFailed call");
4746
delegate.connectFailed(uri, sa, ioe);
4847
}
4948
}

src/test/java/com/palantir/docker/proxy/DockerContainerInfoUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package com.palantir.docker.proxy;
66

77
import static com.palantir.docker.proxy.DockerContainerInfoUtils.IP_FORMAT_STRING;
8-
import static org.junit.Assert.assertFalse;
8+
import static org.assertj.core.api.Assertions.assertThat;
99
import static org.mockito.ArgumentMatchers.any;
1010
import static org.mockito.ArgumentMatchers.anyLong;
1111
import static org.mockito.Mockito.mock;
@@ -34,7 +34,7 @@ public void getContainerIpFromIdDoesNotThrowWhenContainerIsStopped() throws IOEx
3434
when(dockerExecutable.execute("inspect", "--format", IP_FORMAT_STRING, CONTAINER_ID)).thenReturn(response);
3535

3636
Optional<String> ip = DockerContainerInfoUtils.getContainerIpFromId(dockerExecutable, CONTAINER_ID);
37-
assertFalse(ip.isPresent());
37+
assertThat(ip.isPresent()).isFalse();
3838
}
3939

4040
private InputStream getDockerOutputForStoppedContainer() {

0 commit comments

Comments
 (0)