Timur Alperovich created JCLOUDS-899:
----------------------------------------
Summary: Google cloud storage returns null when creating a bucket
on conflict (409)
Key: JCLOUDS-899
URL: https://issues.apache.org/jira/browse/JCLOUDS-899
Project: jclouds
Issue Type: Bug
Components: jclouds-blobstore
Reporter: Timur Alperovich
Google cloud storage registers the following fallback handler:
{code:java}
public final class GoogleCloudStorageFallbacks {
public static final class NullOnBucketAlreadyExists implements
Fallback<Object> {
public Object createOrPropagate(Throwable t) throws Exception {
if (checkNotNull(t, "throwable") instanceof IllegalStateException) {
return null;
}
throw propagate(t);
}
}
}
{code}
which returns _null_ when a bucket exists (and may be owned by someone else).
In a similar situation, S3 throws a _ResourceAlreadyExists_ exception. I did
notice that there is a unit test for this behavior in jclouds-google-storage,
so it's clearly the intended behavior, but it does deviate from the other
providers. I'd appreciate if someone could shine some light on why this handler
was added. It'd be nice to have the interface be consistent between the
providers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)