From a458fffa27c7b6213d999028c548c027c9434c4a Mon Sep 17 00:00:00 2001 From: Picnic-Bot Date: Thu, 4 May 2023 09:53:57 +0200 Subject: [PATCH] Upgrade Google Java Format 1.16.0 -> 1.17.0 (#611) See: - https://github.com/google/google-java-format/releases/tag/v1.17.0 - https://github.com/google/google-java-format/compare/v1.16.0...v1.17.0 --- .../bugpatterns/CanonicalAnnotationSyntaxTest.java | 10 ++++++++++ .../LexicographicalAnnotationAttributeListingTest.java | 10 ++++++++++ .../LexicographicalAnnotationListingTest.java | 5 +++++ .../bugpatterns/SpringMvcAnnotationTest.java | 5 +++++ pom.xml | 2 +- 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntaxTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntaxTest.java index 150d3866824..1c37fad1887 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntaxTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntaxTest.java @@ -34,9 +34,11 @@ void identification() { " // BUG: Diagnostic contains:", " @pkg.A.Foo()", " A functional1();", + "", " // BUG: Diagnostic contains:", " @A.Foo()", " A functional2();", + "", " // BUG: Diagnostic contains:", " @Foo()", " A functional3();", @@ -53,9 +55,11 @@ void identification() { " // BUG: Diagnostic contains:", " @pkg.A.Foo({1})", " A singleton1();", + "", " // BUG: Diagnostic contains:", " @A.Foo({1})", " A singleton2();", + "", " // BUG: Diagnostic contains:", " @Foo({1})", " A singleton3();", @@ -63,9 +67,11 @@ void identification() { " // BUG: Diagnostic contains:", " @pkg.A.Foo(value = 1)", " A verbose1();", + "", " // BUG: Diagnostic contains:", " @A.Foo(value = 1)", " A verbose2();", + "", " // BUG: Diagnostic contains:", " @Foo(value = 1)", " A verbose3();", @@ -82,9 +88,11 @@ void identification() { " // BUG: Diagnostic contains:", " @pkg.A.Foo(value2 = {2})", " A customSingleton1();", + "", " // BUG: Diagnostic contains:", " @A.Foo(value2 = {2})", " A customSingleton2();", + "", " // BUG: Diagnostic contains:", " @Foo(value2 = {2})", " A customSingleton3();", @@ -112,11 +120,13 @@ void identification() { " 1, 1,", " })", " A trailingComma1();", + "", " // BUG: Diagnostic contains:", " @A.Foo({", " 1, 1,", " })", " A trailingComma2();", + "", " // BUG: Diagnostic contains:", " @Foo({", " 1, 1,", diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListingTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListingTest.java index 43fb54c0e20..da842fd92a8 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListingTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListingTest.java @@ -50,18 +50,21 @@ void identification() { "", " @Foo({\"a\", \"b\"})", " A sortedStrings();", + "", " // BUG: Diagnostic contains:", " @Foo({\"b\", \"a\"})", " A unsortedString();", "", " @Foo({\"ab\", \"Ac\"})", " A sortedStringCaseInsensitive();", + "", " // BUG: Diagnostic contains:", " @Foo({\"ac\", \"Ab\"})", " A unsortedStringCaseInsensitive();", "", " @Foo({\"A\", \"a\"})", " A sortedStringCaseInsensitiveWithTotalOrderFallback();", + "", " // BUG: Diagnostic contains:", " @Foo({\"a\", \"A\"})", " A unsortedStringCaseInsensitiveWithTotalOrderFallback();", @@ -86,6 +89,7 @@ void identification() { "", " @Foo(cls = {int.class, long.class})", " A sortedClasses();", + "", " // BUG: Diagnostic contains:", " @Foo(cls = {long.class, int.class})", " A unsortedClasses();", @@ -98,6 +102,7 @@ void identification() { "", " @Foo(enums = {DOWN, UP})", " A sortedEnums();", + "", " // BUG: Diagnostic contains:", " @Foo(enums = {UP, DOWN})", " A unsortedEnums();", @@ -110,15 +115,18 @@ void identification() { "", " @Foo(anns = {@Bar(\"a\"), @Bar(\"b\")})", " A sortedAnns();", + "", " // BUG: Diagnostic contains:", " @Foo(anns = {@Bar(\"b\"), @Bar(\"a\")})", " A unsortedAnns();", + "", " // BUG: Diagnostic contains:", " @Foo(anns = {@Bar(\"a\"), @Bar({\"b\", \"a\"})})", " A unsortedInnderAnns();", "", " @Foo({\"a=foo\", \"a.b=bar\", \"a.c=baz\"})", " A hierarchicallySorted();", + "", " // BUG: Diagnostic contains:", " @Foo({\"a.b=bar\", \"a.c=baz\", \"a=foo\"})", " A hierarchicallyUnsorted();", @@ -265,12 +273,14 @@ void filtering() { " // BUG: Diagnostic contains:", " @Foo({\"b\", \"a\"})", " A fooValue();", + "", " // BUG: Diagnostic contains:", " @Foo(value2 = {\"b\", \"a\"})", " A fooValue2();", "", " @Bar({\"b\", \"a\"})", " A barValue();", + "", " // BUG: Diagnostic contains:", " @Bar(value2 = {\"b\", \"a\"})", " A barValue2();", diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationListingTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationListingTest.java index dd9722e77ab..e4857157543 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationListingTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationListingTest.java @@ -52,6 +52,7 @@ void identification() { " @Foo", " @Bar", " A unsortedSimpleCase();", + "", " // BUG: Diagnostic contains:", " @Foo()", " @Bar()", @@ -69,6 +70,7 @@ void identification() { " @Baz", " @Bar", " A threeUnsortedAnnotationsSameInitialLetter();", + "", " // BUG: Diagnostic contains:", " @Bar", " @Foo()", @@ -84,11 +86,13 @@ void identification() { " @Foo({\"b\"})", " @Bar({\"a\"})", " A unsortedWithStringAttributes();", + "", " // BUG: Diagnostic contains:", " @Baz(str = {\"a\", \"b\"})", " @Foo(ints = {1, 0})", " @Bar", " A unsortedWithAttributes();", + "", " // BUG: Diagnostic contains:", " @Bar", " @Foo(anns = {@Bar(\"b\"), @Bar(\"a\")})", @@ -104,6 +108,7 @@ void identification() { " @Foo(ints = {1, 2})", " @Foo({\"b\"})", " A sortedRepeatableAnnotation();", + "", " // BUG: Diagnostic contains:", " @Foo(anns = {@Bar(\"b\"), @Bar(\"a\")})", " @Bar", diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotationTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotationTest.java index b28562c0a4d..d0ae0c49ca9 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotationTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotationTest.java @@ -32,18 +32,23 @@ void identification() { "", " @RequestMapping(method = {})", " A explicitDefault();", + "", " // BUG: Diagnostic contains:", " @RequestMapping(method = RequestMethod.GET)", " A get();", + "", " // BUG: Diagnostic contains:", " @RequestMapping(method = {RequestMethod.POST})", " A post();", + "", " // BUG: Diagnostic contains:", " @RequestMapping(method = {PUT})", " A put();", + "", " // BUG: Diagnostic contains:", " @RequestMapping(method = {DELETE})", " A delete();", + "", " // BUG: Diagnostic contains:", " @RequestMapping(method = {PATCH})", " A patch();", diff --git a/pom.xml b/pom.xml index 81c279f8605..f7fa586a78f 100644 --- a/pom.xml +++ b/pom.xml @@ -306,7 +306,7 @@ com.google.googlejavaformat google-java-format - 1.16.0 + 1.17.0