Stop referring to "Spring 3.x" features in documentation and code
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This package contains mock implementations of the
|
||||
* {@link org.springframework.core.env.Environment Environment} and
|
||||
* {@link org.springframework.core.env.PropertySource PropertySource}
|
||||
* abstractions introduced in Spring 3.1.
|
||||
* abstractions.
|
||||
*
|
||||
* <p>These <em>mocks</em> are useful for developing <em>out-of-container</em>
|
||||
* unit tests for code that depends on environment-specific properties.
|
||||
|
||||
@@ -491,12 +491,12 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
|
||||
/**
|
||||
* Return the primary value for the given header as a String, if any.
|
||||
* Will return the first value in case of multiple values.
|
||||
* <p>As of Servlet 3.0, this method is also defined in {@link HttpServletResponse}.
|
||||
* As of Spring 3.1, it returns a stringified value for Servlet 3.0 compatibility.
|
||||
* Consider using {@link #getHeaderValue(String)} for raw Object access.
|
||||
* <p>Will return the first value in case of multiple values.
|
||||
* <p>Returns a stringified value for Servlet 3.0 compatibility. Consider
|
||||
* using {@link #getHeaderValue(String)} for raw Object access.
|
||||
* @param name the name of the header
|
||||
* @return the associated header value, or {@code null} if none
|
||||
* @see HttpServletResponse#getHeader(String)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -507,11 +507,11 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
|
||||
/**
|
||||
* Return all values for the given header as a List of Strings.
|
||||
* <p>As of Servlet 3.0, this method is also defined in {@link HttpServletResponse}.
|
||||
* As of Spring 3.1, it returns a List of stringified values for Servlet 3.0 compatibility.
|
||||
* <p>Returns a List of stringified values for Servlet 3.0 compatibility.
|
||||
* Consider using {@link #getHeaderValues(String)} for raw Object access.
|
||||
* @param name the name of the header
|
||||
* @return the associated header values, or an empty List if none
|
||||
* @see HttpServletResponse#getHeaders(String)
|
||||
*/
|
||||
@Override
|
||||
public List<String> getHeaders(String name) {
|
||||
|
||||
@@ -34,17 +34,16 @@ import org.springframework.core.annotation.AliasFor;
|
||||
*
|
||||
* <h3>Supported Resource Types</h3>
|
||||
*
|
||||
* <p>Prior to Spring 3.1, only path-based resource locations (typically XML configuration
|
||||
* files) were supported. As of Spring 3.1, {@linkplain #loader context loaders} may
|
||||
* choose to support <em>either</em> path-based <em>or</em> class-based resources. As of
|
||||
* Spring 4.0.4, {@linkplain #loader context loaders} may choose to support path-based
|
||||
* <em>and</em> class-based resources simultaneously. Consequently
|
||||
* <p>{@linkplain #loader Context loaders} may choose to support <em>either</em>
|
||||
* path-based resource locations (typically XML configuration files) <em>or</em>
|
||||
* class-based resources. Alternatively, context loaders may choose to support
|
||||
* path-based <em>and</em> class-based resources simultaneously. Consequently
|
||||
* {@code @ContextConfiguration} can be used to declare either path-based resource
|
||||
* locations (via the {@link #locations} or {@link #value} attribute) <em>or</em>
|
||||
* component classes (via the {@link #classes} attribute). Note, however, that most
|
||||
* implementations of {@link SmartContextLoader} only support a single resource type. As
|
||||
* of Spring 4.1, path-based resource locations may be either XML configuration files or
|
||||
* Groovy scripts (if Groovy is on the classpath). Of course, third-party frameworks may
|
||||
* implementations of {@link SmartContextLoader} only support a single resource type.
|
||||
* Path-based resource locations may be either XML configuration files or Groovy
|
||||
* scripts (if Groovy is on the classpath). Of course, third-party frameworks may
|
||||
* choose to support additional types of path-based resources.
|
||||
*
|
||||
* <h3>Component Classes</h3>
|
||||
|
||||
@@ -49,9 +49,9 @@ import org.springframework.util.ResourceUtils;
|
||||
* <em>Template Method</em> based approach for {@link #processLocations processing}
|
||||
* resource locations.
|
||||
*
|
||||
* <p>As of Spring 3.1, {@code AbstractContextLoader} also provides a basis
|
||||
* for all concrete implementations of the {@link SmartContextLoader} SPI. For
|
||||
* backwards compatibility with the {@code ContextLoader} SPI,
|
||||
* <p>{@code AbstractContextLoader} also provides a basis for all concrete implementations
|
||||
* of the {@link SmartContextLoader} SPI. For backwards compatibility with the
|
||||
* {@code ContextLoader} SPI,
|
||||
* {@link #processContextConfiguration(ContextConfigurationAttributes)} delegates
|
||||
* to {@link #processLocations(Class, String...)}.
|
||||
*
|
||||
@@ -233,11 +233,11 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
|
||||
* is the value of the first configured
|
||||
* {@linkplain #getResourceSuffixes() resource suffix} for which the
|
||||
* generated location actually exists in the classpath.
|
||||
* <p>As of Spring 3.1, the implementation of this method adheres to the
|
||||
* contract defined in the {@link SmartContextLoader} SPI. Specifically,
|
||||
* this method will <em>preemptively</em> verify that the generated default
|
||||
* location actually exists. If it does not exist, this method will log a
|
||||
* warning and return an empty array.
|
||||
* <p>The implementation of this method adheres to the contract defined in the
|
||||
* {@link SmartContextLoader} SPI. Specifically, this method will
|
||||
* <em>preemptively</em> verify that the generated default location actually
|
||||
* exists. If it does not exist, this method will log a warning and return an
|
||||
* empty array.
|
||||
* <p>Subclasses can override this method to implement a different
|
||||
* <em>default location generation</em> strategy.
|
||||
* @param clazz the class for which the default locations are to be generated
|
||||
@@ -294,13 +294,13 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
|
||||
* Determine whether <em>default</em> resource locations should be
|
||||
* generated if the {@code locations} provided to
|
||||
* {@link #processLocations(Class, String...)} are {@code null} or empty.
|
||||
* <p>As of Spring 3.1, the semantics of this method have been overloaded
|
||||
* to include detection of either default resource locations or default
|
||||
* configuration classes. Consequently, this method can also be used to
|
||||
* determine whether <em>default</em> configuration classes should be
|
||||
* detected if the {@code classes} present in the
|
||||
* {@link ContextConfigurationAttributes configuration attributes} supplied
|
||||
* to {@link #processContextConfiguration(ContextConfigurationAttributes)}
|
||||
* <p>The semantics of this method have been overloaded to include detection
|
||||
* of either default resource locations or default configuration classes.
|
||||
* Consequently, this method can also be used to determine whether
|
||||
* <em>default</em> configuration classes should be detected if the
|
||||
* {@code classes} present in the {@linkplain ContextConfigurationAttributes
|
||||
* configuration attributes} supplied to
|
||||
* {@link #processContextConfiguration(ContextConfigurationAttributes)}
|
||||
* are {@code null} or empty.
|
||||
* <p>Can be overridden by subclasses to change the default behavior.
|
||||
* @return always {@code true} by default
|
||||
|
||||
@@ -60,8 +60,8 @@ import org.springframework.util.Assert;
|
||||
* (e.g., XML configuration files and Groovy scripts) or annotated classes,
|
||||
* but not both simultaneously.
|
||||
*
|
||||
* <p>As of Spring Framework 3.2, a test class may optionally declare neither path-based
|
||||
* resource locations nor annotated classes and instead declare only {@linkplain
|
||||
* <p>A test class may optionally declare neither path-based resource locations
|
||||
* nor annotated classes and instead declare only {@linkplain
|
||||
* ContextConfiguration#initializers application context initializers}. In such
|
||||
* cases, an attempt will still be made to detect defaults, but their absence will
|
||||
* not result in an exception.
|
||||
|
||||
Reference in New Issue
Block a user