cloudfiles NPE when CDN not present

This commit is contained in:
Adrian Cole 2012-01-07 05:13:58 -08:00
parent ef021720b1
commit cc5aa5cee2
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ public class PublicUriForObjectInfo implements Function<ObjectInfo, URI> {
try { try {
return uriBuilders.get().uri(cdnContainer.getUnchecked(from.getContainer())).path(from.getName()).replaceQuery("") return uriBuilders.get().uri(cdnContainer.getUnchecked(from.getContainer())).path(from.getName()).replaceQuery("")
.build(); .build();
} catch (NullPointerException e) {
// nulls not permitted from cache loader
return null;
} catch (CacheLoader.InvalidCacheLoadException e) { } catch (CacheLoader.InvalidCacheLoadException e) {
// nulls not permitted from cache loader // nulls not permitted from cache loader
return null; return null;