mirror of https://github.com/apache/jclouds.git
Proper exception to catch for methods with unchecked exception
This commit is contained in:
parent
215df85105
commit
cd7b3b9b36
|
@ -60,7 +60,7 @@ public class BlobPropertiesToBlobMetadata implements Function<BlobProperties, Mu
|
||||||
PublicAccess containerAcl = containerAcls.getUnchecked(from.getContainer());
|
PublicAccess containerAcl = containerAcls.getUnchecked(from.getContainer());
|
||||||
if (containerAcl != PublicAccess.PRIVATE)
|
if (containerAcl != PublicAccess.PRIVATE)
|
||||||
to.setPublicUri(from.getUrl());
|
to.setPublicUri(from.getUrl());
|
||||||
} catch (Exception ex) {
|
} catch (RuntimeException ex) {
|
||||||
//AzureBlob is not a publicly accessible object, but it is impossible to obtain ACL using SAS Auth.
|
//AzureBlob is not a publicly accessible object, but it is impossible to obtain ACL using SAS Auth.
|
||||||
InsufficientAccessRightsException iare = Throwables2.getFirstThrowableOfType(ex, InsufficientAccessRightsException.class);
|
InsufficientAccessRightsException iare = Throwables2.getFirstThrowableOfType(ex, InsufficientAccessRightsException.class);
|
||||||
if (iare == null) throw ex;
|
if (iare == null) throw ex;
|
||||||
|
|
Loading…
Reference in New Issue