changeset 1916:4f0275ea56fd

6520574: JFileChooser - create new folder - not editable Reviewed-by: malenkov
author rupashka
date Wed, 18 Nov 2009 12:58:02 +0300
parents 86be1dc90f57
children fc3997fd1bce
files src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Tue Nov 17 16:01:09 2009 +0300
+++ b/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java	Wed Nov 18 12:58:02 2009 +0300
@@ -486,7 +486,7 @@
                 }
                 if (remSize > 0 && addSize == 0) {
                     fireIntervalRemoved(BasicDirectoryModel.this, remStart, remStart + remSize - 1);
-                } else if (addSize > 0 && remSize == 0 && fileCache.size() > addSize) {
+                } else if (addSize > 0 && remSize == 0 && addStart + addSize <= fileCache.size()) {
                     fireIntervalAdded(BasicDirectoryModel.this, addStart, addStart + addSize - 1);
                 } else {
                     fireContentsChanged();