Browse Source

Polishing

pull/22521/head
Juergen Hoeller 7 years ago
parent
commit
aa89a57953
  1. 2
      spring-beans/src/main/java/org/springframework/beans/factory/config/BeanExpressionContext.java
  2. 2
      spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java
  3. 7
      spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java
  4. 4
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
  5. 24
      spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java
  6. 2
      spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java
  7. 8
      spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java
  8. 2
      spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java
  9. 2
      spring-core/src/main/java/org/springframework/core/AttributeAccessor.java
  10. 4
      spring-core/src/main/java/org/springframework/util/ClassUtils.java
  11. 2
      spring-core/src/main/java/org/springframework/util/UpdateMessageDigestInputStream.java

2
spring-beans/src/main/java/org/springframework/beans/factory/config/BeanExpressionContext.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.

2
spring-beans/src/main/java/org/springframework/beans/factory/config/PreferencesPlaceholderConfigurer.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.

7
spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyOverrideConfigurer.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.
@ -64,6 +64,9 @@ import org.springframework.beans.factory.BeanInitializationException; @@ -64,6 +64,9 @@ import org.springframework.beans.factory.BeanInitializationException;
*/
public class PropertyOverrideConfigurer extends PropertyResourceConfigurer {
/**
* The default bean name separator.
*/
public static final String DEFAULT_BEAN_NAME_SEPARATOR = ".";
@ -72,7 +75,7 @@ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer { @@ -72,7 +75,7 @@ public class PropertyOverrideConfigurer extends PropertyResourceConfigurer {
private boolean ignoreInvalidKeys = false;
/**
* Contains names of beans that have overrides
* Contains names of beans that have overrides.
*/
private final Set<String> beanNames = Collections.newSetFromMap(new ConcurrentHashMap<>(16));

4
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -971,7 +971,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac @@ -971,7 +971,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
return null;
}
Object instance = null;
Object instance;
try {
// Mark this bean as currently in creation, even if just partially.
beforePrototypeCreation(beanName);

24
spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java

@ -89,7 +89,7 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader @@ -89,7 +89,7 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
public static final String SEPARATOR = ".";
/**
* Special key to distinguish {@code owner.(class)=com.myapp.MyClass}-
* Special key to distinguish {@code owner.(class)=com.myapp.MyClass}.
*/
public static final String CLASS_KEY = "(class)";
@ -299,10 +299,10 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader @@ -299,10 +299,10 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
/**
* Register bean definitions contained in a Map,
* using all property keys (i.e. not filtering by prefix).
* @param map Map: name -> property (String or Object). Property values
* will be strings if coming from a Properties file etc. Property names
* Register bean definitions contained in a Map, using all property keys (i.e. not
* filtering by prefix).
* @param map a map of {@code name} to {@code property} (String or Object). Property
* values will be strings if coming from a Properties file etc. Property names
* (keys) <b>must</b> be Strings. Class keys must be Strings.
* @return the number of bean definitions found
* @throws BeansException in case of loading or parsing errors
@ -315,8 +315,8 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader @@ -315,8 +315,8 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
/**
* Register bean definitions contained in a Map.
* Ignore ineligible properties.
* @param map Map name -> property (String or Object). Property values
* will be strings if coming from a Properties file etc. Property names
* @param map a map of {@code name} to {@code property} (String or Object). Property
* values will be strings if coming from a Properties file etc. Property names
* (keys) <b>must</b> be Strings. Class keys must be Strings.
* @param prefix a filter within the keys in the map: e.g. 'beans.'
* (can be empty or {@code null})
@ -330,9 +330,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader @@ -330,9 +330,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
/**
* Register bean definitions contained in a Map.
* Ignore ineligible properties.
* @param map Map name -> property (String or Object). Property values
* will be strings if coming from a Properties file etc. Property names
* (keys) <b>must</b> be strings. Class keys must be Strings.
* @param map a map of {@code name} to {@code property} (String or Object). Property
* values will be strings if coming from a Properties file etc. Property names
* (keys) <b>must</b> be Strings. Class keys must be Strings.
* @param prefix a filter within the keys in the map: e.g. 'beans.'
* (can be empty or {@code null})
* @param resourceDescription description of the resource that the
@ -392,9 +392,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader @@ -392,9 +392,9 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
/**
* Get all property values, given a prefix (which will be stripped)
* and add the bean they define to the factory with the given name
* and add the bean they define to the factory with the given name.
* @param beanName name of the bean to define
* @param map Map containing string pairs
* @param map a Map containing string pairs
* @param prefix prefix of each entry, which will be stripped
* @param resourceDescription description of the resource that the
* Map came from (for logging purposes)

2
spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleInstantiationStrategy.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.

8
spring-beans/src/main/java/org/springframework/beans/factory/xml/PluggableSchemaResolver.java

@ -44,12 +44,12 @@ import org.springframework.util.CollectionUtils; @@ -44,12 +44,12 @@ import org.springframework.util.CollectionUtils;
*
* <p>The format of {@code META-INF/spring.schemas} is a properties file where each line
* should be of the form {@code systemId=schema-location} where {@code schema-location}
* should also be a schema file in the classpath. Since systemId is commonly a URL,
* one must be careful to escape any ':' characters which are treated as delimiters
* should also be a schema file in the classpath. Since {@code systemId} is commonly a
* URL, one must be careful to escape any ':' characters which are treated as delimiters
* in properties files.
*
* <p>The pattern for the mapping files can be overidden using the
* {@link #PluggableSchemaResolver(ClassLoader, String)} constructor
* <p>The pattern for the mapping files can be overridden using the
* {@link #PluggableSchemaResolver(ClassLoader, String)} constructor.
*
* @author Rob Harrop
* @author Juergen Hoeller

2
spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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.

2
spring-core/src/main/java/org/springframework/core/AttributeAccessor.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 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.

4
spring-core/src/main/java/org/springframework/util/ClassUtils.java

@ -759,9 +759,9 @@ public abstract class ClassUtils { @@ -759,9 +759,9 @@ public abstract class ClassUtils {
* conflicting method signatures (or a similar constraint is violated)
* @see java.lang.reflect.Proxy#getProxyClass
*/
@SuppressWarnings("deprecation")
@SuppressWarnings("deprecation") // on JDK 9
public static Class<?> createCompositeInterface(Class<?>[] interfaces, @Nullable ClassLoader classLoader) {
Assert.notEmpty(interfaces, "Interfaces must not be empty");
Assert.notEmpty(interfaces, "Interface array must not be empty");
return Proxy.getProxyClass(classLoader, interfaces);
}

2
spring-core/src/main/java/org/springframework/util/UpdateMessageDigestInputStream.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 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.

Loading…
Cancel
Save