allow usermetadata to be null

This commit is contained in:
Adrian Cole 2011-04-01 13:52:43 -07:00
parent 84a84f481f
commit ddbd6fc1d8
1 changed files with 3 additions and 1 deletions

View File

@ -41,6 +41,7 @@ import org.jclouds.io.Payloads;
import org.jclouds.io.payloads.PhantomPayload;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
/**
@ -69,7 +70,8 @@ public class BlobBuilderImpl implements BlobBuilder {
@Override
public BlobBuilder userMetadata(Map<String, String> userMetadata) {
this.userMetadata = Maps.newLinkedHashMap(checkNotNull(userMetadata, "userMetadata"));
if (userMetadata == null)
this.userMetadata = ImmutableMap.copyOf(userMetadata);
return this;
}