From b8760f67c7bbae415641010ee71ba26619f31e87 Mon Sep 17 00:00:00 2001
From: Excavator Bot <33266368+svc-excavator-bot@users.noreply.github.com>
Date: Tue, 9 Jan 2024 13:04:58 -0800
Subject: [PATCH] Excavator: Upgrades Baseline to the latest version (#920)
---
.baseline/idea/intellij-java-palantir-style.xml | 1 +
build.gradle | 2 +-
.../main/java/com/palantir/javaformat/gradle/FormatDiff.java | 3 +--
.../palantir/javaformat/intellij/PalantirCodeStyleManager.java | 1 +
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.baseline/idea/intellij-java-palantir-style.xml b/.baseline/idea/intellij-java-palantir-style.xml
index 6a5f83a61..476c88c43 100644
--- a/.baseline/idea/intellij-java-palantir-style.xml
+++ b/.baseline/idea/intellij-java-palantir-style.xml
@@ -58,6 +58,7 @@
+
diff --git a/build.gradle b/build.gradle
index 88c142857..a999e4b51 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
dependencies {
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.6.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.35.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.17.0'
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.12.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.0.0'
diff --git a/gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/FormatDiff.java b/gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/FormatDiff.java
index d645b58ab..d12907dc7 100644
--- a/gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/FormatDiff.java
+++ b/gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/FormatDiff.java
@@ -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;
@@ -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();
}
diff --git a/idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirCodeStyleManager.java b/idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirCodeStyleManager.java
index dcbe737b4..0095fef54 100644
--- a/idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirCodeStyleManager.java
+++ b/idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirCodeStyleManager.java
@@ -78,6 +78,7 @@ public PalantirCodeStyleManager(@NotNull Project project) {
this.project = original.getProject();
}
+ @SuppressWarnings("ImmutableMapDuplicateKeyStrategy")
static Map getReplacements(
FormatterService formatter, String text, Collection extends TextRange> ranges) {
try {