Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3762

S5838 should support Java 11 "String.isBlank()"

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.15
    • Component/s: Rules
    • Labels:

      Description

      Java 11 introduced the method isBlank on Strings. AssertJ also support this operation, it means that the code could be possibly simplified:

          assertThat(getString().isBlank()).isTrue(); // Noncompliant {{Use assertThat(actual).isBlank() instead.}}
          assertThat(getString().isBlank()).isFalse(); // Noncompliant {{Use assertThat(actual).isNotBlank() instead.}}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alban.auzeill Alban Auzeill
                Reporter:
                quentin.jaquier Quentin Jaquier
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: