From 452e9b55c677f8e0ba18c798bd5629fbb82cef2e Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Thu, 6 Jul 2023 11:49:32 +0200 Subject: [PATCH] Suggestions --- .../tech/picnic/errorprone/refasterrules/StringRules.java | 8 ++++---- pom.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java index 3d43a96668..7acfb7835b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java @@ -47,8 +47,8 @@ boolean after(String str) { /** Prefer a method reference to {@link String#isEmpty()} over the equivalent lambda function. */ // XXX: Now that we build with JDK 15+, this rule can be generalized to cover all `CharSequence` - // subtypes. But `CharSequence::isEmpty` isn't as nice as `String::isEmpty`, so we might want to - // introduce a rule that suggests `String::isEmpty` where possible. + // subtypes. However, `CharSequence::isEmpty` isn't as nice as `String::isEmpty`, so we might want + // to introduce a rule that suggests `String::isEmpty` where possible. // XXX: As it stands, this rule is a special case of what `MethodReferenceUsage` tries to achieve. // If/when `MethodReferenceUsage` becomes production ready, we should simply drop this check. static final class StringIsEmptyPredicate { @@ -65,8 +65,8 @@ Predicate after() { /** Prefer a method reference to {@link String#isEmpty()} over the equivalent lambda function. */ // XXX: Now that we build with JDK 15+, this rule can be generalized to cover all `CharSequence` - // subtypes. But `CharSequence::isEmpty` isn't as nice as `String::isEmpty`, so we might want to - // introduce a rule that suggests `String::isEmpty` where possible. + // subtypes. However, `CharSequence::isEmpty` isn't as nice as `String::isEmpty`, so we might want + // to introduce a rule that suggests `String::isEmpty` where possible. static final class StringIsNotEmptyPredicate { @BeforeTemplate Predicate before() { diff --git a/pom.xml b/pom.xml index f1634c63ab..df21544c8b 100644 --- a/pom.xml +++ b/pom.xml @@ -1887,10 +1887,10 @@ true + than what would normally be supported given the language + features used, but this causes Sonar to report parse errors. + So for Sonar builds we target a JDK version that is properly + compatible with the source code. --> ${version.jdk.source}