diff options
author | Artur Signell <artur.signell@itmill.com> | 2012-02-03 15:22:17 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2012-02-03 15:22:17 +0000 |
commit | 35079c30b8d3fde26dd27736c4a062d9bf3be9af (patch) | |
tree | b64d6caa3397bf66d307b509f23bd9d92ecd6bd9 /tests | |
parent | 534eada6d086f7cc466883f49e48578e250d39dd (diff) | |
download | vaadin-framework-35079c30b8d3fde26dd27736c4a062d9bf3be9af.tar.gz vaadin-framework-35079c30b8d3fde26dd27736c4a062d9bf3be9af.zip |
Throw an error if directory listing fails
svn changeset:22890/svn branch:6.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server-side/com/vaadin/tests/server/SourceFileChecker.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java index 4fa4523927..3115ce49c8 100644 --- a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java +++ b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java @@ -103,7 +103,12 @@ public class SourceFileChecker extends TestCase { Assert.assertTrue("Directory " + directory + " does not exist", directory.exists()); - for (File f : directory.listFiles()) { + File[] files = directory.listFiles(); + if (files == null) { + throw new RuntimeException("Listing of directory " + + directory.getPath() + " failed"); + } + for (File f : files) { boolean ignoreThis = false; for (String ignore : ignores) { if (new File(baseDirectory, ignore).equals(f)) { |