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 Aug 29, 2023
1 parent 8a837d5 commit 26a0da5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
# the code is compiled using JDK 17, while the tests are executed
# using JDK 11.
- name: Check out code
uses: actions/checkout@v3.1.0
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@v3.8.0
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
java-version: |
11.0.19
Expand Down
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 @@ -1892,10 +1892,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 26a0da5

Please sign in to comment.