Issue 128: catch exception if a container type isn't present so that exists() can work

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2432 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-12-15 05:50:00 +00:00
parent 5f3bee6f2e
commit 43b9daf617
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,7 @@ import org.apache.commons.vfs.util.MonitorOutputStream;
import org.apache.commons.vfs.util.RandomAccessMode;
import org.apache.log4j.Logger;
import org.jclouds.blobstore.BlobStore;
import org.jclouds.blobstore.ContainerNotFoundException;
import org.jclouds.blobstore.KeyNotFoundException;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.BlobMetadata;
@ -320,6 +321,9 @@ public class BlobStoreFileObject extends AbstractFileObject {
} catch (NoSuchElementException nse) {
metadata = null;
logger.info(String.format("<< not found: %s/%s", getContainer(), name));
} catch (ContainerNotFoundException cnfe) {
metadata = null;
logger.info(String.format("<< not found: %s", getContainer()));
}
}