For example the following calls when listing a bucket that is empty or getting an item from a bucket that exists but the item does not:
storage.list( bucketName )
storage.get( bucketName, itemName )
The NPE is generated from the Preconditions class called via transform() in the Iterables class:
public static <T> T checkNotNull(T reference) {
if(reference == null) {
throw new NullPointerException();
} else {
return reference;
}
}
It would be nicer to return a null to the caller perhaps. wdyt?