> +import org.jclouds.javax.annotation.Nullable;
> +
> +import com.google.common.collect.ImmutableList;
> +import com.google.common.collect.ImmutableMap;
> +
> +public final class NullSafeCopies {
> +
> + public static <K, V> Map<K, V> copyOf(@Nullable Map<K, V> map) {
> + return map != null ? ImmutableMap.copyOf(map) : ImmutableMap.<K,
> V>of();
> + }
> +
> + public static <E> List<E> copyOf(@Nullable List<E> list) {
> + return list != null ? ImmutableList.copyOf(list) :
> ImmutableList.<E>of();
> + }
> +
> + private NullSafeCopies() {
[minor] Do we consider it useful/necessary to have an exception thrown here?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19765969