HHH-13189 simpler empty check

This commit is contained in:
Tomas Lamr 2019-01-07 14:40:39 +01:00 committed by Sanne Grinovero
parent 7abcf9bc9b
commit b32cacac71
1 changed files with 2 additions and 2 deletions

View File

@ -45,13 +45,13 @@ public class ParameterMetadataImpl implements ParameterMetadata {
this.ordinalDescriptorMap = ordinalDescriptorMap == null
? Collections.emptyMap()
: Collections.unmodifiableMap( ordinalDescriptorMap );
this.ordinalDescriptorValueCache = ordinalDescriptorMap == null
this.ordinalDescriptorValueCache = this.ordinalDescriptorMap.isEmpty()
? Collections.emptySet()
: Collections.unmodifiableSet(new HashSet<>(this.ordinalDescriptorMap.values()));
this.namedDescriptorMap = namedDescriptorMap == null
? Collections.emptyMap()
: Collections.unmodifiableMap( namedDescriptorMap );
this.namedDescriptorValueCache = namedDescriptorMap == null
this.namedDescriptorValueCache = this.namedDescriptorMap.isEmpty()
? Collections.emptySet()
: Collections.unmodifiableSet(new HashSet<>(this.namedDescriptorMap.values()));