--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java Tue Nov 17 16:01:09 2009 +0300
+++ b/jdk/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();