Remove unnecessary List.indexOf from RepaintManager.removeInvalidComponent

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 26
    • Affects Version/s: None
    • Component/s: client-libs

                  int index = invalidComponents.indexOf(component);
                  if(index != -1) {
                      invalidComponents.remove(index);
                  }

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

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

              Created:
              Updated:
              Resolved: