# HG changeset patch # User ssadetsky # Date 1468824253 -10800 # Node ID 889e919f632e5c7efdc26943f143cb8da654ba75 # Parent ad2a71a4f495d1ee4847af0d8e2b0ae4348c0443 8159587: IOOBE in javax/swing/JFileChooser/7199708/bug7199708.java Reviewed-by: alexsch diff -r ad2a71a4f495 -r 889e919f632e jdk/src/java.desktop/share/classes/sun/swing/FilePane.java --- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Fri Jul 01 15:50:03 2016 +0200 +++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Mon Jul 18 09:44:13 2016 +0300 @@ -1748,8 +1748,8 @@ if (listSelectionModel != null) { listSelectionModel.clearSelection(); if (listSelectionModel instanceof DefaultListSelectionModel) { - ((DefaultListSelectionModel)listSelectionModel).moveLeadSelectionIndex(0); - listSelectionModel.setAnchorSelectionIndex(0); + ((DefaultListSelectionModel)listSelectionModel).moveLeadSelectionIndex(-1); + listSelectionModel.setAnchorSelectionIndex(-1); } } } diff -r ad2a71a4f495 -r 889e919f632e jdk/test/javax/swing/JFileChooser/7199708/bug7199708.java --- a/jdk/test/javax/swing/JFileChooser/7199708/bug7199708.java Fri Jul 01 15:50:03 2016 +0200 +++ b/jdk/test/javax/swing/JFileChooser/7199708/bug7199708.java Mon Jul 18 09:44:13 2016 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ /** * @test - * @bug 7199708 + * @bug 7199708 8159587 * @author Alexander Scherbatiy * @summary FileChooser crashs when opening large folder * @run main bug7199708