Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3528

Use Collections min and max methods where appropriate

    XMLWordPrintable

Details

    • Refactoring
    • Status: Closed
    • Minor
    • Resolution: Complete
    • None
    • 4.1 RC1, 3.0.6, 4.0.5
    • Core

    Description

      There are at least two places where Collections.sort() is used to get the min or max element of a collection: AbstractCorrelatingMessageHandler and SequenceSizeReleaseStrategy.

      Collections.min() and Collections.max() can be used.

      This could be a performance improvement depending on the usage, but the most important improvement is code readability.

      Attachments

        Activity

          People

            grussell Gary Russell
            enriquerodbe Enrique Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: