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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • None
    • 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;

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

              Created:
              Updated: