Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Sep 4, 2019
1 parent 8d9eb64 commit 4184a3f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="ignoreEnhancedForColon" value="false"/>
<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)"/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
Expand All @@ -435,7 +436,7 @@
</module>
<module name="CyclomaticComplexity"/> <!-- Java Coding Guidelines: Reduce Cyclomatic Complexity -->
<module name="DesignForExtension"> <!-- Java Coding Guidelines: Design for extension -->
<property name="ignoredAnnotations" value="Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
</module>
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:13.2.0'
classpath 'com.palantir.baseline:gradle-baseline-java:0.59.0'
classpath 'com.palantir.baseline:gradle-baseline-java:1.19.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.11.0'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.0.1'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ public Deserializer<Void> emptyBodyDeserializer() {
return response -> {
try {
if (response.body().read() != -1) {
throw new RuntimeException("Expected empty response body");
throw new SafeRuntimeException("Expected empty response body");
}
} catch (IOException e) {
throw new RuntimeException("Failed to read from response body", e);
throw new SafeRuntimeException("Failed to read from response body", e);
}
return null;
};
Expand Down Expand Up @@ -142,7 +142,7 @@ public RequestBody serialize(T value) {
bytes.flush();
bytes.close();
} catch (IOException e) {
throw new RuntimeException("Failed to close or flush ByteStream. This is a bug.", e);
throw new SafeRuntimeException("Failed to close or flush ByteStream. This is a bug.", e);
}

return new RequestBody() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public <T> Serializer<T> serializer(TypeMarker<T> type) {
try {
writer.writeValue(output, value);
} catch (IOException e) {
throw new RuntimeException("Failed to serialize payload, this is a bug", e);
throw new SafeRuntimeException("Failed to serialize payload, this is a bug", e);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.palantir.logsafe.Preconditions;
import com.palantir.logsafe.SafeArg;
import com.palantir.logsafe.UnsafeArg;
import com.palantir.logsafe.exceptions.SafeIllegalArgumentException;
import java.io.ByteArrayOutputStream;
import java.net.MalformedURLException;
import java.net.URL;
Expand Down Expand Up @@ -131,7 +132,7 @@ public URL build() {

return new URL(protocol, host, port, file.toString());
} catch (MalformedURLException e) {
throw new IllegalArgumentException("Malformed URL", e);
throw new SafeIllegalArgumentException("Malformed URL", e);
}
}

Expand Down

0 comments on commit 4184a3f

Please sign in to comment.