A DESCRIPTION OF THE PROBLEM :
The documentation of javafx.collections.ObservableList#setAll states that the method returns "true (as specified by Collection.add(E))" which implies that the method returns "true if this collection changed as a result of the call". However, when an ObservableList#setAll is invoked on an empty list with an empty array, the list is not modified, but the method still returns "true" (since it is hardcoded).
---------- BEGIN SOURCE ----------
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class Test {
public static void main(String[] args) {
ObservableList<String> list = FXCollections.observableArrayList();
System.out.println(list.setAll()); // prints "true" even though the list was not modified
}
}
---------- END SOURCE ----------
FREQUENCY : always
The documentation of javafx.collections.ObservableList#setAll states that the method returns "true (as specified by Collection.add(E))" which implies that the method returns "true if this collection changed as a result of the call". However, when an ObservableList#setAll is invoked on an empty list with an empty array, the list is not modified, but the method still returns "true" (since it is hardcoded).
---------- BEGIN SOURCE ----------
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class Test {
public static void main(String[] args) {
ObservableList<String> list = FXCollections.observableArrayList();
System.out.println(list.setAll()); // prints "true" even though the list was not modified
}
}
---------- END SOURCE ----------
FREQUENCY : always