diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java index c2820c29c536..f98ce40e6080 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 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. @@ -219,8 +219,7 @@ protected void processProperties(ConfigurableListableBeanFactory beanFactoryToPr throws BeansException { StringValueResolver valueResolver = new PlaceholderResolvingStringValueResolver(props); - - this.doProcessProperties(beanFactoryToProcess, valueResolver); + doProcessProperties(beanFactoryToProcess, valueResolver); } /** diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java index f70e163ce46c..e906c121865e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 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. @@ -279,7 +279,7 @@ public BeanDefinitionBuilder setDependencyCheck(int dependencyCheck) { */ public BeanDefinitionBuilder addDependsOn(String beanName) { if (this.beanDefinition.getDependsOn() == null) { - this.beanDefinition.setDependsOn(new String[] {beanName}); + this.beanDefinition.setDependsOn(beanName); } else { String[] added = ObjectUtils.addObjectToArray(this.beanDefinition.getDependsOn(), beanName); diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Role.java b/spring-context/src/main/java/org/springframework/context/annotation/Role.java index 3abdca32b17f..f8dc81ca6d6f 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Role.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Role.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. @@ -28,16 +28,16 @@ * Indicates the 'role' hint for a given bean. * *
May be used on any class directly or indirectly annotated with - * {@link org.springframework.stereotype.Component} or on methods annotated with - * {@link Bean}. + * {@link org.springframework.stereotype.Component} or on methods + * annotated with {@link Bean}. * - *
If this annotation is not present on a Component or Bean definition, the - * default value of {@link BeanDefinition#ROLE_APPLICATION} will apply. + *
If this annotation is not present on a Component or Bean definition, + * the default value of {@link BeanDefinition#ROLE_APPLICATION} will apply. * - *
If Role is present on a {@link Configuration @Configuration} class, this - * indicates the role of the configuration class bean definition and does not - * cascade to all @{@code Bean} methods defined within. This behavior is - * different than that of the @{@link Lazy} annotation, for example. + *
If Role is present on a {@link Configuration @Configuration} class, + * this indicates the role of the configuration class bean definition and + * does not cascade to all @{@code Bean} methods defined within. This behavior + * is different than that of the @{@link Lazy} annotation, for example. * * @author Chris Beams * @since 3.1 diff --git a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java index 0b0186b8a68b..511eb5e69dc3 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/support/ResourceBundleMessageSource.java @@ -152,7 +152,7 @@ public void setBasenames(String... basenames) { * Set the default charset to use for parsing resource bundle files. *
Default is none, using the {@code java.util.ResourceBundle}
* default encoding: ISO-8859-1.
- * and more flexibility in setting of an encoding per file.
+ * @since 3.1.3
*/
public void setDefaultEncoding(String defaultEncoding) {
this.defaultEncoding = defaultEncoding;
@@ -167,6 +167,7 @@ public void setDefaultEncoding(String defaultEncoding) {
* {@code java.util.ResourceBundle}. However, this is often not desirable
* in an application server environment, where the system Locale is not relevant
* to the application at all: Set this flag to "false" in such a scenario.
+ * @since 3.1.3
*/
public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) {
this.fallbackToSystemLocale = fallbackToSystemLocale;
@@ -188,6 +189,7 @@ public void setFallbackToSystemLocale(boolean fallbackToSystemLocale) {
* Consider {@link ReloadableResourceBundleMessageSource} in combination
* with resource bundle files in a non-classpath location.
*
+ * @since 3.1.3
*/
public void setCacheSeconds(int cacheSeconds) {
this.cacheMillis = (cacheSeconds * 1000);
@@ -304,7 +306,7 @@ protected ResourceBundle getResourceBundle(String basename, Locale locale) {
* @param locale the Locale to look for
* @return the corresponding ResourceBundle
* @throws MissingResourceException if no matching bundle could be found
- * @see java.util.ResourceBundle#getBundle(String, java.util.Locale, ClassLoader)
+ * @see java.util.ResourceBundle#getBundle(String, Locale, ClassLoader)
* @see #getBundleClassLoader()
*/
protected ResourceBundle doGetBundle(String basename, Locale locale) throws MissingResourceException {
diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/ProxyAsyncConfiguration.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/ProxyAsyncConfiguration.java
index b216de1173d2..f4a3b2034b08 100644
--- a/spring-context/src/main/java/org/springframework/scheduling/annotation/ProxyAsyncConfiguration.java
+++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/ProxyAsyncConfiguration.java
@@ -44,7 +44,7 @@ public class ProxyAsyncConfiguration extends AbstractAsyncConfiguration {
public AsyncAnnotationBeanPostProcessor asyncAdvisor() {
Assert.notNull(this.enableAsync, "@EnableAsync annotation metadata was not injected");
AsyncAnnotationBeanPostProcessor bpp = new AsyncAnnotationBeanPostProcessor();
- Class extends Annotation> customAsyncAnnotation = enableAsync.getClass("annotation");
+ Class extends Annotation> customAsyncAnnotation = this.enableAsync.getClass("annotation");
if (customAsyncAnnotation != AnnotationUtils.getDefaultValue(EnableAsync.class, "annotation")) {
bpp.setAsyncAnnotationType(customAsyncAnnotation);
}
diff --git a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
index edadd3ab909e..9dbb027a9f95 100644
--- a/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
+++ b/spring-core/src/main/java/org/springframework/util/CollectionUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -335,9 +335,10 @@ public static This configuration class is automatically imported when using the @{@link EnableJms}
- * annotation. See {@link EnableJms} Javadoc for complete usage.
+ * annotation. See the {@link EnableJms} javadocs for complete usage details.
*
* @author Stephane Nicoll
* @since 4.1
diff --git a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java
index 9373d3ea8b30..2397196d3e01 100644
--- a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java
+++ b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -55,55 +55,56 @@ public class CastorMarshallerTests extends AbstractMarshallerTests {
/**
* Represents the expected result that doesn't contain the xml declaration.
*/
- private static final String DOCUMENT_EXPECTED_STRING = ""
- + " The xpath may contain the xml namespace prefixes, since namespaces from flight example
+ * are being registered.
* @param msg the error message that will be used in case of test failure
* @param expected the expected value
* @param xpath the xpath to evaluate
@@ -302,8 +303,6 @@ private void assertXpathEvaluatesTo(String msg, String expected, String xpath, S
/**
* Creates a instance of {@link CastorObject} for testing.
- *
- * @return a instance of {@link CastorObject}
*/
private CastorObject createCastorObject() {
CastorObject castorObject = new CastorObject();
@@ -311,4 +310,5 @@ private CastorObject createCastorObject() {
castorObject.setValue(8);
return castorObject;
}
+
}
diff --git a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java
index 1c55ef1af76c..d77acd5202ca 100644
--- a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java
+++ b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorUnmarshallerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2014 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.
@@ -47,15 +47,16 @@ public class CastorUnmarshallerTests extends AbstractUnmarshallerTests {
*/
protected static final String EXTRA_ATTRIBUTES_STRING =
" Supported for annotated handler methods in Servlet environments.
*
* @author Arjen Poutsma
+ * @since 3.0
* @see RequestHeader
* @see ResponseBody
* @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter
* @see org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
- * @since 3.0
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@@ -49,6 +49,7 @@
* Default is {@code true}, leading to an exception thrown in case
* there is no body content. Switch this to {@code false} if you prefer
* {@code null} to be passed when the body content is {@code null}.
+ * @since 3.2
*/
boolean required() default true;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java
index a99dfcbf0724..84f81d7138af 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java
@@ -50,8 +50,8 @@
*
* An {@code @RequestBody} method argument is also validated if it is annotated
* with {@code @javax.validation.Valid}. In case of validation failure,
- * {@link MethodArgumentNotValidException} is raised and results in a 400 response
- * status code if {@link DefaultHandlerExceptionResolver} is configured.
+ * {@link MethodArgumentNotValidException} is raised and results in an HTTP 400
+ * response status code if {@link DefaultHandlerExceptionResolver} is configured.
*
* @author Arjen Poutsma
* @author Rossen Stoyanchev
@@ -114,7 +114,7 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m
protected Also see {@link RequestResponseBodyMethodProcessorMockTests}.
*
@@ -177,9 +177,7 @@ public void resolveArgumentClassString() throws Exception {
assertEquals("foobarbaz", result);
}
- // SPR-9942
-
- @Test(expected = HttpMessageNotReadableException.class)
+ @Test(expected = HttpMessageNotReadableException.class) // SPR-9942
public void resolveArgumentRequiredNoContent() throws Exception {
this.servletRequest.setContent(new byte[0]);
this.servletRequest.setContentType("text/plain");
@@ -189,9 +187,7 @@ public void resolveArgumentRequiredNoContent() throws Exception {
processor.resolveArgument(paramString, mavContainer, webRequest, binderFactory);
}
- // SPR-9964
-
- @Test
+ @Test // SPR-9964
public void resolveArgumentTypeVariable() throws Exception {
Method method = MyParameterizedController.class.getMethod("handleDto", Identifiable.class);
HandlerMethod handlerMethod = new HandlerMethod(new MySimpleParameterizedController(), method);
@@ -211,9 +207,7 @@ public void resolveArgumentTypeVariable() throws Exception {
assertEquals("Jad", result.getName());
}
- // SPR-11225
-
- @Test
+ @Test // SPR-11225
public void resolveArgumentTypeVariableWithNonGenericConverter() throws Exception {
Method method = MyParameterizedController.class.getMethod("handleDto", Identifiable.class);
HandlerMethod handlerMethod = new HandlerMethod(new MySimpleParameterizedController(), method);
@@ -235,9 +229,7 @@ public void resolveArgumentTypeVariableWithNonGenericConverter() throws Exceptio
assertEquals("Jad", result.getName());
}
- // SPR-9160
-
- @Test
+ @Test // SPR-9160
public void handleReturnValueSortByQuality() throws Exception {
this.servletRequest.addHeader("Accept", "text/plain; q=0.5, application/json");
@@ -346,9 +338,7 @@ public void jacksonJsonViewWithResponseEntityAndJsonMessageConverter() throws Ex
assertFalse(content.contains("\"withoutView\":\"without\""));
}
- // SPR-12149
-
- @Test
+ @Test // SPR-12149
public void jacksonJsonViewWithResponseBodyAndXmlMessageConverter() throws Exception {
Method method = JacksonViewController.class.getMethod("handleResponseBody");
HandlerMethod handlerMethod = new HandlerMethod(new JacksonViewController(), method);