diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-10-27 16:17:49 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-10-27 16:17:49 +0000 |
commit | e272907594ae2bdc7ae8daefae0a9b4778d93e4b (patch) | |
tree | cbb32abe1c7ec3ef61677900b9991f796f2f1251 /src/com/vaadin | |
parent | 869d81e7fffb7f2f7989979c57cecd860133b58f (diff) | |
download | vaadin-framework-e272907594ae2bdc7ae8daefae0a9b4778d93e4b.tar.gz vaadin-framework-e272907594ae2bdc7ae8daefae0a9b4778d93e4b.zip |
#7698 FileSystemContainer throws NPE when a directory cannot be read
svn changeset:21816/svn branch:6.7
Diffstat (limited to 'src/com/vaadin')
-rw-r--r-- | src/com/vaadin/data/util/FilesystemContainer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/FilesystemContainer.java b/src/com/vaadin/data/util/FilesystemContainer.java index a26323f487..76a7b90376 100644 --- a/src/com/vaadin/data/util/FilesystemContainer.java +++ b/src/com/vaadin/data/util/FilesystemContainer.java @@ -395,6 +395,11 @@ public class FilesystemContainer implements Container.Hierarchical { } else { l = f.listFiles(); } + if (l == null) { + // File.listFiles returns null if File does not exist or if there + // was an IO error (permission denied) + return; + } final List<File> ll = Arrays.asList(l); Collections.sort(ll); |