diff --git a/build.gradle b/build.gradle index b83e072c1..13842d10d 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1' classpath 'com.netflix.nebula:gradle-info-plugin:5.2.0' - classpath 'com.palantir.baseline:gradle-baseline-java:2.42.0' + classpath 'com.palantir.baseline:gradle-baseline-java:2.48.0' classpath 'gradle.plugin.org.inferred:gradle-processors:3.2.0' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.14.0' diff --git a/palantir-java-format/src/test/java/com/palantir/javaformat/java/FormatterTest.java b/palantir-java-format/src/test/java/com/palantir/javaformat/java/FormatterTest.java index 1a2284ada..893c121b7 100644 --- a/palantir-java-format/src/test/java/com/palantir/javaformat/java/FormatterTest.java +++ b/palantir-java-format/src/test/java/com/palantir/javaformat/java/FormatterTest.java @@ -330,12 +330,13 @@ public void stringEscapeLength() throws Exception { @Test public void wrapLineComment() throws Exception { - assertThat(Formatter.create().formatSource("class T {\n" - + " public static void main(String[] args) { // one long incredibly" - + " unbroken sentence moving from topic to topic so that no-one had a" - + " chance to interrupt;\n" - + " }\n" - + "}\n")) + assertThat(Formatter.create() + .formatSource("class T {\n" + + " public static void main(String[] args) { // one long incredibly" + + " unbroken sentence moving from topic to topic so that no-one had a" + + " chance to interrupt;\n" + + " }\n" + + "}\n")) .isEqualTo("class T {\n" + " public static void main(\n" + " String[]\n" @@ -348,12 +349,13 @@ public void wrapLineComment() throws Exception { @Test public void onlyWrapLineCommentOnWhitespace() throws Exception { - assertThat(Formatter.create().formatSource("class T {\n" - + " public static void main(String[] args) { // one_long_incredibly" - + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a" - + "_chance_to_interrupt;\n" - + " }\n" - + "}\n")) + assertThat(Formatter.create() + .formatSource("class T {\n" + + " public static void main(String[] args) { // one_long_incredibly" + + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a" + + "_chance_to_interrupt;\n" + + " }\n" + + "}\n")) .isEqualTo("class T {\n" + " public static void main(\n" + " String[]\n" @@ -366,12 +368,13 @@ public void onlyWrapLineCommentOnWhitespace() throws Exception { @Test public void onlyWrapLineCommentOnWhitespace_noLeadingWhitespace() throws Exception { - assertThat(Formatter.create().formatSource("class T {\n" - + " public static void main(String[] args) { //one_long_incredibly" - + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a" - + "_chance_to_interrupt;\n" - + " }\n" - + "}\n")) + assertThat(Formatter.create() + .formatSource("class T {\n" + + " public static void main(String[] args) { //one_long_incredibly" + + "_unbroken_sentence_moving_from_topic_to_topic_so_that_no-one_had_a" + + "_chance_to_interrupt;\n" + + " }\n" + + "}\n")) .isEqualTo("class T {\n" + " public static void main(\n" + " String[]\n" @@ -420,11 +423,12 @@ public void blankLinesImportComment() throws FormatterException { @Test public void dontWrapMoeLineComments() throws Exception { - assertThat(Formatter.create().formatSource("class T {\n" - + " // MOE: one long incredibly" - + " unbroken sentence moving from topic to topic so that no-one had a" - + " chance to interrupt;\n" - + "}\n")) + assertThat(Formatter.create() + .formatSource("class T {\n" + + " // MOE: one long incredibly" + + " unbroken sentence moving from topic to topic so that no-one had a" + + " chance to interrupt;\n" + + "}\n")) .isEqualTo("class T {\n" + " // MOE: one long incredibly" + " unbroken sentence moving from topic to topic so that no-one had a" diff --git a/palantir-java-format/src/test/java/com/palantir/javaformat/java/MainTest.java b/palantir-java-format/src/test/java/com/palantir/javaformat/java/MainTest.java index b04e8d37e..2813e1bbf 100644 --- a/palantir-java-format/src/test/java/com/palantir/javaformat/java/MainTest.java +++ b/palantir-java-format/src/test/java/com/palantir/javaformat/java/MainTest.java @@ -363,10 +363,11 @@ public void dryRunFiles() throws Exception { assertThat(exitCode).isEqualTo(0); - assertThat(out.toString()).isEqualTo(b.toAbsolutePath().toString() - + System.lineSeparator() - + c.toAbsolutePath().toString() - + System.lineSeparator()); + assertThat(out.toString()) + .isEqualTo(b.toAbsolutePath().toString() + + System.lineSeparator() + + c.toAbsolutePath().toString() + + System.lineSeparator()); assertThat(err.toString()).isEmpty(); }