Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie authored and Stephan202 committed Oct 23, 2023
1 parent 6f5f90c commit 452e9b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -65,8 +65,8 @@ Predicate<String> 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<String> before() {
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1887,10 +1887,10 @@
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<!-- Normal builds use Jabel to target an older JDK version
than would normally 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.-->
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.target>${version.jdk.source}</version.jdk.target>
</properties>
</profile>
Expand Down

0 comments on commit 452e9b5

Please sign in to comment.