-
Bug
-
Resolution: Fixed
-
P3
-
8u20
-
Mac OSX Mavericks 10.9.2
JDK: 1.8.0_20-ea-b10
1) Run the sample demo application below
2) Click on the 5th row
3) Hold down the shift key + the up arrow key until the top of the list is reached
4) IndexOutOfBoundsException occurred
[Logs]
Apr 23, 2014 2:34:16 PM com.sun.javafx.collections.ListListenerHelper$Generic fireValueChangedEvent
WARNING: Exception in ListChangeListenerListener
java.lang.IndexOutOfBoundsException
at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.subList(ReadOnlyUnbackedObservableList.java:136)
at javafx.collections.ListChangeListener$Change.getAddedSubList(ListChangeListener.java:242)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.lambda$new$158(ListViewBehavior.java:258)
at com.sun.javafx.scene.control.behavior.ListViewBehavior$$Lambda$93/1197501983.onChanged(Unknown Source)
at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.callObservers(ReadOnlyUnbackedObservableList.java:75)
at javafx.scene.control.MultipleSelectionModelBase.selectIndices(MultipleSelectionModelBase.java:418)
at javafx.scene.control.MultipleSelectionModel.selectRange(MultipleSelectionModel.java:176)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.alsoSelectPreviousRow(ListViewBehavior.java:480)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.callAction(ListViewBehavior.java:179)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:218)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.callActionForEvent(ListViewBehavior.java:213)
at com.sun.javafx.scene.control.behavior.BehaviorBase.lambda$new$60(BehaviorBase.java:135)
at com.sun.javafx.scene.control.behavior.BehaviorBase$$Lambda$91/595853050.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$KeyHandler.process(Scene.java:3871)
at javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3822)
at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1951)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2413)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:197)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:147)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:227)
at com.sun.glass.ui.View.handleKeyEvent(View.java:544)
at com.sun.glass.ui.View.notifyKey(View.java:954)
[Demo.java]
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
public class Demo extends Application {
@Override public void start(Stage primaryStage) {
ObservableList<Number> data = FXCollections.observableArrayList();
for( int i = 0; i < 20; i++ ) {
data.add(i);
}
primaryStage.setScene(new Scene(new ListView(data), 150, 200));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
2) Click on the 5th row
3) Hold down the shift key + the up arrow key until the top of the list is reached
4) IndexOutOfBoundsException occurred
[Logs]
Apr 23, 2014 2:34:16 PM com.sun.javafx.collections.ListListenerHelper$Generic fireValueChangedEvent
WARNING: Exception in ListChangeListenerListener
java.lang.IndexOutOfBoundsException
at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.subList(ReadOnlyUnbackedObservableList.java:136)
at javafx.collections.ListChangeListener$Change.getAddedSubList(ListChangeListener.java:242)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.lambda$new$158(ListViewBehavior.java:258)
at com.sun.javafx.scene.control.behavior.ListViewBehavior$$Lambda$93/1197501983.onChanged(Unknown Source)
at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.callObservers(ReadOnlyUnbackedObservableList.java:75)
at javafx.scene.control.MultipleSelectionModelBase.selectIndices(MultipleSelectionModelBase.java:418)
at javafx.scene.control.MultipleSelectionModel.selectRange(MultipleSelectionModel.java:176)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.alsoSelectPreviousRow(ListViewBehavior.java:480)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.callAction(ListViewBehavior.java:179)
at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:218)
at com.sun.javafx.scene.control.behavior.ListViewBehavior.callActionForEvent(ListViewBehavior.java:213)
at com.sun.javafx.scene.control.behavior.BehaviorBase.lambda$new$60(BehaviorBase.java:135)
at com.sun.javafx.scene.control.behavior.BehaviorBase$$Lambda$91/595853050.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$KeyHandler.process(Scene.java:3871)
at javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3822)
at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1951)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2413)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:197)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:147)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:227)
at com.sun.glass.ui.View.handleKeyEvent(View.java:544)
at com.sun.glass.ui.View.notifyKey(View.java:954)
[Demo.java]
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
public class Demo extends Application {
@Override public void start(Stage primaryStage) {
ObservableList<Number> data = FXCollections.observableArrayList();
for( int i = 0; i < 20; i++ ) {
data.add(i);
}
primaryStage.setScene(new Scene(new ListView(data), 150, 200));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}