Initialize pre-filled HashMaps with large enough capacity
Empty Maps are preferably initialized without capacity (not initializing them at all or lazily initializing with default capacity when needed). Issue: SPR-17105
This commit is contained in:
@@ -38,7 +38,7 @@ import org.springframework.util.StringUtils;
|
||||
public abstract class AttributeAccessorSupport implements AttributeAccessor, Serializable {
|
||||
|
||||
/** Map with String keys and Object values. */
|
||||
private final Map<String, Object> attributes = new LinkedHashMap<>(0);
|
||||
private final Map<String, Object> attributes = new LinkedHashMap<>();
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user