Fix NPE when creating DomainNameMapping via a builder

This commit is contained in:
Trustin Lee 2016-05-18 19:26:28 +09:00
parent f11a35af32
commit da46928950

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;
}
/**