Fix NPE when creating DomainNameMapping via a builder
This commit is contained in:
parent
6a7ee52cd4
commit
9c34c3f344
@ -68,7 +68,8 @@ public class DomainNameMapping<V> implements Mapping<String, V> {
|
|||||||
DomainNameMapping(Map<String, V> map, V defaultValue) {
|
DomainNameMapping(Map<String, V> map, V defaultValue) {
|
||||||
this.defaultValue = checkNotNull(defaultValue, "defaultValue");
|
this.defaultValue = checkNotNull(defaultValue, "defaultValue");
|
||||||
this.map = map;
|
this.map = map;
|
||||||
unmodifiableMap = Collections.unmodifiableMap(map);
|
unmodifiableMap = map != null ? Collections.unmodifiableMap(map)
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user