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:
Juergen Hoeller 2010-10-01 22:22:50 +00:00
parent f3e7fd9bc9
commit 9d06c4ac55
5 changed files with 9 additions and 9 deletions

View File

@ -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);
}
/**

View File

@ -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>();

View File

@ -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;

View File

@ -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);
/**

View File

@ -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;