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

ObservableListWrapper.remove(int fromIndex, int toIndex) Typo

XMLWordPrintable

      JDK-8-Build-b121:

      package com.sun.javafx.collections;

      public class ObservableListWrapper<E> extends ModifiableObservableListBase<E> implements
              ObservableList<E>, SortableList<E>, RandomAccess {

      ....

      line 159
          @Override
          public void remove(int fromIndex, int toIndex) {
              beginChange();
              for (int i = fromIndex; i < toIndex; ++i) {
                  remove(fromIndex);
              }
              endChange();
          }


      I guess the remove() method should be called with "i" rather then "fromIndex" parameter.

            msladecek Martin Sládeček
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: