Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5504

Check emptiness with Collection.isEmpty()

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 17.0.0.Beta3, 17.0.0.Final
    • 17.0.0.Beta2
    • None
    • None

      Check emptiness with Collection.isEmpty() instead of size(). The time complexity of any isEmpty() method implementation should be O ( 1 ) whereas some implementations of size() can be O ( n ).
      Refers to https://rules.sonarsource.com/java/RSPEC-1155

              jmesnil1@redhat.com Jeff Mesnil
              xf01213 Boris Unckel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: