> +            generateFileList(localFile, remotePath + localFile.getName() + 
> "/", blobDetails);
> +         }
> +      }
> +   }
> +
> +   /**
> +    * Upload the files in parallel.
> +    */
> +   private void uploadFiles(String container, List<BlobDetail> blobDetails)
> +         throws InterruptedException, ExecutionException {
> +      ListeningExecutorService executor = null;
> +      
> +      try {
> +         executor = 
> MoreExecutors.listeningDecorator(newFixedThreadPool(THREADS));
> +         List<ListenableFuture<BlobDetail>> blobUploaderFutures = 
> Lists.newArrayList();      
> +         BlobUploaderCallback blobUploaderCallback = new 
> BlobUploaderCallback();

None of these calls should throw an exception (since [`THREADS > 
0`](http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool\(int\)),
 so move this out of the `try` block? And then we don't need the `if (executor 
!= null)...` check in the `finally` below..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/11/files#r5438290

Reply via email to