From 207583b21ec6991a36b1d4c4585f50ad656e99d5 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Wed, 18 Nov 2009 12:58:02 +0300 Subject: [PATCH] 6520574: JFileChooser - create new folder - not editable Reviewed-by: malenkov --- .../classes/javax/swing/plaf/basic/BasicDirectoryModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java index 1e5d80f8ea2..77709a94401 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java @@ -486,7 +486,7 @@ public class BasicDirectoryModel extends AbstractListModel implements PropertyCh } 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();