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

Use Collections min and max methods where appropriate

    XMLWordPrintable

    Details

    • Type: Refactoring
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 4.1 RC1, 3.0.6, 4.0.5
    • Component/s: Core
    • Labels:

      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

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

              Dates

              Created:
              Updated:
              Resolved: