Browse Source

Related polishing

Issue: SPR-11386
pull/455/head
Juergen Hoeller 11 years ago
parent
commit
6634c19e6a
  1. 12
      spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
  2. 7
      spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java

12
spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java

@ -94,14 +94,15 @@ public class CachedIntrospectionResults { @@ -94,14 +94,15 @@ public class CachedIntrospectionResults {
public static final String IGNORE_BEANINFO_PROPERTY_NAME = "spring.beaninfo.ignore";
private static final Log logger = LogFactory.getLog(CachedIntrospectionResults.class);
private static final boolean shouldIntrospectorIgnoreBeaninfoClasses;
private static final boolean shouldIntrospectorIgnoreBeaninfoClasses =
SpringProperties.getFlag(IGNORE_BEANINFO_PROPERTY_NAME);
/** Stores the BeanInfoFactory instances */
private static List<BeanInfoFactory> beanInfoFactories = SpringFactoriesLoader.loadFactories(
BeanInfoFactory.class, CachedIntrospectionResults.class.getClassLoader());
private static final Log logger = LogFactory.getLog(CachedIntrospectionResults.class);
/**
* Set of ClassLoaders that this CachedIntrospectionResults class will always
* accept classes from, even if the classes do not qualify as cache-safe.
@ -116,11 +117,6 @@ public class CachedIntrospectionResults { @@ -116,11 +117,6 @@ public class CachedIntrospectionResults {
static final Map<Class<?>, Object> classCache = new WeakHashMap<Class<?>, Object>();
static {
shouldIntrospectorIgnoreBeaninfoClasses = SpringProperties.getFlag(IGNORE_BEANINFO_PROPERTY_NAME);
}
/**
* Accept the given ClassLoader as cache-safe, even if its classes would
* not qualify as cache-safe in this CachedIntrospectionResults class.

7
spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java vendored

@ -66,7 +66,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -66,7 +66,6 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
*/
public static final String IGNORE_GETENV_PROPERTY_NAME = "spring.getenv.ignore";
/**
* Name of property to set to specify active profiles: {@value}. Value may be comma
* delimited.
@ -122,14 +121,10 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment { @@ -122,14 +121,10 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* @see #customizePropertySources(MutablePropertySources)
*/
public AbstractEnvironment() {
String name = getClass().getSimpleName();
if (this.logger.isDebugEnabled()) {
this.logger.debug(format("Initializing new %s", name));
}
customizePropertySources(this.propertySources);
if (this.logger.isDebugEnabled()) {
this.logger.debug(format(
"Initialized %s with PropertySources %s", name, this.propertySources));
"Initialized %s with PropertySources %s", getClass().getSimpleName(), this.propertySources));
}
}

Loading…
Cancel
Save