reduced BeanDefinition footprint by initializing Sets and Maps with 0
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3706 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
f3e7fd9bc9
commit
9d06c4ac55
|
|
@ -50,7 +50,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
|
|||
* @see #add(String, Object)
|
||||
*/
|
||||
public MutablePropertyValues() {
|
||||
this.propertyValueList = new ArrayList<PropertyValue>();
|
||||
this.propertyValueList = new ArrayList<PropertyValue>(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -42,7 +42,7 @@ import org.springframework.util.ObjectUtils;
|
|||
*/
|
||||
public class ConstructorArgumentValues {
|
||||
|
||||
private final Map<Integer, ValueHolder> indexedArgumentValues = new LinkedHashMap<Integer, ValueHolder>();
|
||||
private final Map<Integer, ValueHolder> indexedArgumentValues = new LinkedHashMap<Integer, ValueHolder>(0);
|
||||
|
||||
private final List<ValueHolder> genericArgumentValues = new LinkedList<ValueHolder>();
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
|
|||
private boolean primary = false;
|
||||
|
||||
private final Map<String, AutowireCandidateQualifier> qualifiers =
|
||||
new LinkedHashMap<String, AutowireCandidateQualifier>();
|
||||
new LinkedHashMap<String, AutowireCandidateQualifier>(0);
|
||||
|
||||
private boolean nonPublicAccessAllowed = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -34,7 +34,7 @@ import java.util.Set;
|
|||
*/
|
||||
public class MethodOverrides {
|
||||
|
||||
private final Set<MethodOverride> overrides = new HashSet<MethodOverride>();
|
||||
private final Set<MethodOverride> overrides = new HashSet<MethodOverride>(0);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ import org.springframework.util.Assert;
|
|||
*/
|
||||
public class RootBeanDefinition extends AbstractBeanDefinition {
|
||||
|
||||
private final Set<Member> externallyManagedConfigMembers = Collections.synchronizedSet(new HashSet<Member>());
|
||||
private final Set<Member> externallyManagedConfigMembers = Collections.synchronizedSet(new HashSet<Member>(0));
|
||||
|
||||
private final Set<String> externallyManagedInitMethods = Collections.synchronizedSet(new HashSet<String>());
|
||||
private final Set<String> externallyManagedInitMethods = Collections.synchronizedSet(new HashSet<String>(0));
|
||||
|
||||
private final Set<String> externallyManagedDestroyMethods = Collections.synchronizedSet(new HashSet<String>());
|
||||
private final Set<String> externallyManagedDestroyMethods = Collections.synchronizedSet(new HashSet<String>(0));
|
||||
|
||||
private BeanDefinitionHolder decoratedDefinition;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue