Browse Source

Polishing

pull/452/head
Juergen Hoeller 11 years ago
parent
commit
5331da6aff
  1. 6
      spring-beans/src/main/java/org/springframework/beans/CachedIntrospectionResults.java
  2. 9
      spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java

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

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2013 the original author or authors. * Copyright 2002-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -221,8 +221,8 @@ public class CachedIntrospectionResults {
synchronized (acceptedClassLoaders) { synchronized (acceptedClassLoaders) {
acceptedLoaderArray = acceptedClassLoaders.toArray(new ClassLoader[acceptedClassLoaders.size()]); acceptedLoaderArray = acceptedClassLoaders.toArray(new ClassLoader[acceptedClassLoaders.size()]);
} }
for (ClassLoader registeredLoader : acceptedLoaderArray) { for (ClassLoader acceptedLoader : acceptedLoaderArray) {
if (isUnderneathClassLoader(classLoader, registeredLoader)) { if (isUnderneathClassLoader(classLoader, acceptedLoader)) {
return true; return true;
} }
} }

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

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2013 the original author or authors. * Copyright 2002-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -43,10 +43,11 @@ import static org.springframework.util.StringUtils.*;
* add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute * add by default. {@code AbstractEnvironment} adds none. Subclasses should contribute
* property sources through the protected {@link #customizePropertySources(MutablePropertySources)} * property sources through the protected {@link #customizePropertySources(MutablePropertySources)}
* hook, while clients should customize using {@link ConfigurableEnvironment#getPropertySources()} * hook, while clients should customize using {@link ConfigurableEnvironment#getPropertySources()}
* and working against the {@link MutablePropertySources} API. See * and working against the {@link MutablePropertySources} API.
* {@link ConfigurableEnvironment} Javadoc for usage examples. * See {@link ConfigurableEnvironment} javadoc for usage examples.
* *
* @author Chris Beams * @author Chris Beams
* @author Juergen Hoeller
* @since 3.1 * @since 3.1
* @see ConfigurableEnvironment * @see ConfigurableEnvironment
* @see StandardEnvironment * @see StandardEnvironment
@ -403,6 +404,8 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
* and therefore avoiding security manager warnings (if any). * and therefore avoiding security manager warnings (if any).
* <p>The default implementation checks for the "spring.getenv.ignore" system property, * <p>The default implementation checks for the "spring.getenv.ignore" system property,
* returning {@code true} if its value equals "true" in any case. * returning {@code true} if its value equals "true" in any case.
* @see #IGNORE_GETENV_PROPERTY_NAME
* @see SpringProperties#getFlag
*/ */
protected boolean suppressGetenvAccess() { protected boolean suppressGetenvAccess() {
return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME); return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME);

Loading…
Cancel
Save