From 60d7a7f519af53836217b7ef817b981dc5df0b46 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 21 Sep 2015 23:18:58 +0200 Subject: [PATCH] Polishing --- .../java/org/springframework/beans/factory/BeanFactory.java | 1 + .../org/springframework/context/annotation/Configuration.java | 2 +- .../context/config/PropertyOverrideBeanDefinitionParser.java | 4 ++-- .../config/PropertyPlaceholderBeanDefinitionParser.java | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java index 8d092cba45..ab80498b46 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java @@ -161,6 +161,7 @@ public interface BeanFactory { * @return an instance of the single bean matching the required type * @throws NoSuchBeanDefinitionException if no bean of the given type was found * @throws NoUniqueBeanDefinitionException if more than one bean of the given type was found + * @throws BeansException if the bean could not be created * @since 3.0 * @see ListableBeanFactory */ diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java index 4b81239af9..c8a8b75124 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java @@ -218,7 +218,7 @@ import org.springframework.stereotype.Component; * {@code } definitions within Spring XML files. It is also possible to * import Spring XML configuration files into {@code @Configuration} classes using * the {@link ImportResource @ImportResource} annotation. Bean definitions imported from XML can be - * injected using {@code @Autowired} or {@code @Import}: + * injected using {@code @Autowired} or {@code @Inject}: *
  * @Configuration
  * @ImportResource("classpath:/com/acme/database-config.xml")
diff --git a/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java
index cf496b7346..4f994d4b2b 100644
--- a/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2012 the original author or authors.
+ * Copyright 2002-2015 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.
@@ -37,8 +37,8 @@ class PropertyOverrideBeanDefinitionParser extends AbstractPropertyLoadingBeanDe
 
 	@Override
 	protected void doParse(Element element, BeanDefinitionBuilder builder) {
-
 		super.doParse(element, builder);
+
 		builder.addPropertyValue("ignoreInvalidKeys",
 				Boolean.valueOf(element.getAttribute("ignore-unresolvable")));
 
diff --git a/spring-context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java
index 60d55605b3..006f15e098 100644
--- a/spring-context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java
+++ b/spring-context/src/main/java/org/springframework/context/config/PropertyPlaceholderBeanDefinitionParser.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2011 the original author or authors.
+ * Copyright 2002-2015 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,8 +34,10 @@ import org.springframework.util.StringUtils;
 class PropertyPlaceholderBeanDefinitionParser extends AbstractPropertyLoadingBeanDefinitionParser {
 
 	private static final String SYSTEM_PROPERTIES_MODE_ATTRIB = "system-properties-mode";
+
 	private static final String SYSTEM_PROPERTIES_MODE_DEFAULT = "ENVIRONMENT";
 
+
 	@Override
 	protected Class getBeanClass(Element element) {
 		// As of Spring 3.1, the default value of system-properties-mode has changed from