From aebf81e0c27a4f29ab39b3d7184098cb01707daf Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Fri, 30 Sep 2022 03:57:53 +0000 Subject: [PATCH] Excavator: Upgrades Baseline to the latest version --- .baseline/checkstyle/checkstyle.xml | 4 +++- build.gradle | 2 +- .../javaformat/intellij/PalantirCodeStyleManager.java | 2 +- .../src/main/java/com/palantir/javaformat/java/JavaInput.java | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.baseline/checkstyle/checkstyle.xml b/.baseline/checkstyle/checkstyle.xml index 1a086c49c..0297c79f4 100644 --- a/.baseline/checkstyle/checkstyle.xml +++ b/.baseline/checkstyle/checkstyle.xml @@ -402,7 +402,9 @@ - + + + diff --git a/build.gradle b/build.gradle index c787b0830..28c9b7549 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.gradle.publish:plugin-publish-plugin:1.0.0' - classpath 'com.palantir.baseline:gradle-baseline-java:4.145.0' + classpath 'com.palantir.baseline:gradle-baseline-java:4.179.0' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.11.0' classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.11.0' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.15.0' 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..ffa3a5b31 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 @@ -85,7 +85,7 @@ static Map 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(); diff --git a/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java b/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java index 7d348a0af..1621efbf1 100644 --- a/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java +++ b/palantir-java-format/src/main/java/com/palantir/javaformat/java/JavaInput.java @@ -307,7 +307,7 @@ private static ImmutableMap makePositionToColumnMap(List for (Tok tok : toks) { builder.put(tok.getPosition(), tok.getColumn()); } - return builder.build(); + return builder.buildOrThrow(); } /**