Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8360487

Remove unnecessary List.indexOf key from AbstractMidiDevice.TransmitterList.remove

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 26
    • None
    • client-libs

      No need to call 'List.indexOf(Object)' before 'List.remove(int)'. Instead we can call 'List.remove(Object)' directly. It's faster and cleaner.

                      int index = transmitters.indexOf(t);
                      if (index >= 0) {
                          transmitters.remove(index);
                      }

            aturbanov Andrey Turbanov
            aturbanov Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: