Polishing
This commit is contained in:
@@ -27,6 +27,7 @@ import java.util.Arrays;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -151,7 +152,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
|||||||
private boolean hasDestructionAwareBeanPostProcessors;
|
private boolean hasDestructionAwareBeanPostProcessors;
|
||||||
|
|
||||||
/** Map from scope identifier String to corresponding Scope */
|
/** Map from scope identifier String to corresponding Scope */
|
||||||
private final Map<String, Scope> scopes = new HashMap<String, Scope>(8);
|
private final Map<String, Scope> scopes = new LinkedHashMap<String, Scope>(8);
|
||||||
|
|
||||||
/** Security context used when running with a SecurityManager */
|
/** Security context used when running with a SecurityManager */
|
||||||
private SecurityContextProvider securityContextProvider;
|
private SecurityContextProvider securityContextProvider;
|
||||||
@@ -856,11 +857,15 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
|||||||
throw new IllegalArgumentException("Cannot replace existing scopes 'singleton' and 'prototype'");
|
throw new IllegalArgumentException("Cannot replace existing scopes 'singleton' and 'prototype'");
|
||||||
}
|
}
|
||||||
Scope previous = this.scopes.put(scopeName, scope);
|
Scope previous = this.scopes.put(scopeName, scope);
|
||||||
if (previous != null && logger.isInfoEnabled()) {
|
if (previous != null && previous != scope) {
|
||||||
logger.info("Replacing scope '" + scopeName + "' from '" + previous + "' to '" + scope);
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("Replacing scope '" + scopeName + "' from [" + previous + "] to [" + scope + "]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (previous == null && logger.isDebugEnabled()) {
|
else {
|
||||||
logger.debug("Registering scope '" + scopeName + "' with '" + scope + "'");
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("Registering scope '" + scopeName + "' with implementation [" + scope + "]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -893,7 +893,7 @@ public abstract class ClassUtils {
|
|||||||
*/
|
*/
|
||||||
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) {
|
public static Class<?> resolvePrimitiveIfNecessary(Class<?> clazz) {
|
||||||
Assert.notNull(clazz, "Class must not be null");
|
Assert.notNull(clazz, "Class must not be null");
|
||||||
return (clazz.isPrimitive() && clazz != void.class? primitiveTypeToWrapperMap.get(clazz) : clazz);
|
return (clazz.isPrimitive() && clazz != void.class ? primitiveTypeToWrapperMap.get(clazz) : clazz);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user