Remove unnecessary List.contains key from SpringLayout.Constraints.pushConstraint

XMLWordPrintable

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

      No need to call List.indexOf before List.remove. Instead we can use boolean returned by List.remove

                  List<String> history = horizontal ? horizontalHistory :
                                                      verticalHistory;
                  if (history.contains(name)) {
                      history.remove(name);
                      valid = false;

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

              Created:
              Updated:
              Resolved: