From 24b614b1b408114c2e64db3b1bec2e7d3be671cf Mon Sep 17 00:00:00 2001 From: rupashka 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/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java b/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java index 1e5d80f8e..77709a944 100644 --- a/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java +++ b/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(); -- GitLab