Fix NPE when creating DomainNameMapping via a builder

This commit is contained in:
Trustin Lee 2016-05-18 19:26:28 +09:00
parent 6a7ee52cd4
commit 9c34c3f344

View File

@ -68,7 +68,8 @@ public class DomainNameMapping<V> implements Mapping<String, V> {
DomainNameMapping(Map<String, V> map, V defaultValue) {
this.defaultValue = checkNotNull(defaultValue, "defaultValue");
this.map = map;
unmodifiableMap = Collections.unmodifiableMap(map);
unmodifiableMap = map != null ? Collections.unmodifiableMap(map)
: null;
}
/**