Author: mircea.markus
Date: 2009-01-21 11:17:36 -0500 (Wed, 21 Jan 2009)
New Revision: 7564
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
Log:
the list of files might be null, as per javadoc of File.listFiles
Modified: core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java 2009-01-21
15:59:52 UTC (rev 7563)
+++ core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java 2009-01-21
16:17:36 UTC (rev 7564)
@@ -383,6 +383,11 @@
{
boolean success = true;
File[] subdirs = dir.listFiles();
+ if (subdirs == null)
+ {
+ if (log.isWarnEnabled()) log.warn("Null list of files for dir: " +
dir.getAbsolutePath());
+ return false;
+ }
for (File file : subdirs)
{
if (file.isFile() && file.getName().equals(DATA))
Show replies by date