You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2015/02/04 06:00:50 UTC

jclouds git commit: Handle null return value from File.listFiles

Repository: jclouds
Updated Branches:
  refs/heads/master 9fc2ca98a -> 10690f929


Handle null return value from File.listFiles

This matches the behavior of other call sites.
Fixes andrewgaul/s3proxy#39.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/10690f92
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/10690f92
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/10690f92

Branch: refs/heads/master
Commit: 10690f92930787ea71a8a28697252fd400818575
Parents: 9fc2ca9
Author: Andrew Gaul <ga...@apache.org>
Authored: Tue Feb 3 20:20:59 2015 -0800
Committer: Andrew Gaul <ga...@apache.org>
Committed: Tue Feb 3 20:22:58 2015 -0800

----------------------------------------------------------------------
 .../strategy/internal/FilesystemStorageStrategyImpl.java          | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/10690f92/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
index 03c95e8..325b22c 100644
--- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
+++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
@@ -673,6 +673,9 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
    private static void populateBlobKeysInContainer(File directory, Set<String> blobNames,
          Function<String, String> function) {
       File[] children = directory.listFiles();
+      if (children == null) {
+         return;
+      }
       for (File child : children) {
          if (child.isFile()) {
             blobNames.add( function.apply(child.getAbsolutePath()) );