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 Oct 24, 2023
1 parent ff6d1b8 commit a6c58eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
dependencies {
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.5.0'
classpath 'com.gradle.publish:plugin-publish-plugin:1.2.1'
classpath 'com.palantir.baseline:gradle-baseline-java:5.20.0'
classpath 'com.palantir.baseline:gradle-baseline-java:5.30.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.16.0'
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.12.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.google.common.collect.RangeSet;
import com.google.common.collect.Streams;
import com.google.common.collect.TreeRangeSet;
import com.google.common.io.ByteStreams;
import com.palantir.javaformat.java.FormatterException;
import com.palantir.javaformat.java.FormatterService;
import com.palantir.javaformat.java.Replacement;
Expand Down Expand Up @@ -138,7 +137,7 @@ private static String gitCommand(Path dir, String... args) throws IOException, I
Preconditions.checkState(process.exitValue() == 0, "Expected return code of 0");

ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteStreams.copy(process.getInputStream(), baos);
process.getInputStream().transferTo(baos);
return new String(baos.toByteArray(), UTF_8).trim();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static Map<TextRange, String> getReplacements(
formatter.getFormatReplacements(text, toRanges(ranges)).forEach(replacement -> {
replacements.put(toTextRange(replacement.getReplaceRange()), replacement.getReplacementString());
});
return replacements.build();
return replacements.buildOrThrow();
} catch (FormatterException e) {
log.debug("Formatter failed, no replacements", e);
return ImmutableMap.of();
Expand Down

0 comments on commit a6c58eb

Please sign in to comment.