diff --git a/common/src/main/java/io/netty/util/DomainNameMapping.java b/common/src/main/java/io/netty/util/DomainNameMapping.java index b15a0ae67f..d1734aa712 100644 --- a/common/src/main/java/io/netty/util/DomainNameMapping.java +++ b/common/src/main/java/io/netty/util/DomainNameMapping.java @@ -68,7 +68,8 @@ public class DomainNameMapping implements Mapping { DomainNameMapping(Map map, V defaultValue) { this.defaultValue = checkNotNull(defaultValue, "defaultValue"); this.map = map; - unmodifiableMap = Collections.unmodifiableMap(map); + unmodifiableMap = map != null ? Collections.unmodifiableMap(map) + : null; } /**