diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/ActivateProfiles.java b/org.springframework.test/src/main/java/org/springframework/test/context/ActiveProfiles.java
similarity index 87%
rename from org.springframework.test/src/main/java/org/springframework/test/context/ActivateProfiles.java
rename to org.springframework.test/src/main/java/org/springframework/test/context/ActiveProfiles.java
index 28a9acf915d..2781e4cdf78 100644
--- a/org.springframework.test/src/main/java/org/springframework/test/context/ActivateProfiles.java
+++ b/org.springframework.test/src/main/java/org/springframework/test/context/ActiveProfiles.java
@@ -24,9 +24,9 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * {@code ActivateProfiles} is a class-level annotation that is used to
- * activate the bean definition profiles to use when loading an
- * {@link org.springframework.context.ApplicationContext ApplicationContext}
+ * {@code ActiveProfiles} is a class-level annotation that is used to declare
+ * which active bean definition profiles should be used when loading
+ * an {@link org.springframework.context.ApplicationContext ApplicationContext}
* for test classes.
*
* @author Sam Brannen
@@ -40,7 +40,7 @@ import java.lang.annotation.Target;
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
-public @interface ActivateProfiles {
+public @interface ActiveProfiles {
/**
* Alias for {@link #profiles() profiles}.
diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
index cc277d8f05e..18c9fd4c64d 100644
--- a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
+++ b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
@@ -54,9 +54,9 @@ abstract class ContextLoaderUtils {
/**
- * Resolves the {@link ContextLoader}
- * {@link Class} to use for the supplied {@link Class testClass} and
- * then instantiates and returns that ContextLoader.
+ * Resolves the {@link ContextLoader} {@link Class} to use for the
+ * supplied {@link Class testClass} and then instantiates and returns
+ * that ContextLoader.
*
*
If the supplied defaultContextLoaderClassName is
* null or empty, the standard
@@ -68,7 +68,7 @@ abstract class ContextLoaderUtils {
* @param defaultContextLoaderClassName the name of the default
* ContextLoader class to use (may be null)
* @return the resolved ContextLoader for the supplied
- * testClass
+ * testClass (never null)
* @see #resolveContextLoaderClass(Class, String)
*/
static ContextLoader resolveContextLoader(Class> testClass, String defaultContextLoaderClassName) {
@@ -85,8 +85,9 @@ abstract class ContextLoaderUtils {
}
/**
- * Resolve the {@link ContextLoader} {@link Class} to use for the supplied
+ * Resolves the {@link ContextLoader} {@link Class} to use for the supplied
* {@link Class test class}.
+ *
*
defaultContextLoaderClassName.ContextLoader
+ *
+ * @param clazz the class for which to resolve the ContextLoader
* class; must not be null
* @param defaultContextLoaderClassName the name of the default
* ContextLoader class to use; must not be null or empty
* @return the ContextLoader class to use for the specified class
+ * (never null)
* @throws IllegalArgumentException if {@link ContextConfiguration
* @ContextConfiguration} is not present on the supplied class
*/
@@ -155,7 +158,7 @@ abstract class ContextLoaderUtils {
}
/**
- * Retrieve {@link ApplicationContext} resource locations for the supplied
+ * Resolves {@link ApplicationContext} resource locations for the supplied
* {@link Class class}, using the supplied {@link ContextLoader} to
* {@link ContextLoader#processLocations(Class, String...) process} the
* locations.
@@ -166,12 +169,14 @@ abstract class ContextLoaderUtils {
* Specifically, if the inheritLocations flag is set to
* true, locations defined in the annotated class will be
* appended to the locations defined in superclasses.
+ *
* @param contextLoader the ContextLoader to use for processing the
* locations (must not be null)
- * @param clazz the class for which to retrieve the resource locations (must
+ * @param clazz the class for which to resolve the resource locations (must
* not be null)
* @return the list of ApplicationContext resource locations for the
* specified class, including locations from superclasses if appropriate
+ * (never null)
* @throws IllegalArgumentException if {@link ContextConfiguration
* @ContextConfiguration} is not present on the supplied class
*/
@@ -190,7 +195,7 @@ abstract class ContextLoaderUtils {
"Could not find an 'annotation declaring class' for annotation type [%s] and class [%s]", annotationType,
clazz));
- ListNote that the {@link ActiveProfiles#inheritProfiles() inheritProfiles}
+ * flag of {@link ActiveProfiles @ActiveProfiles} will be taken into
+ * consideration. Specifically, if the inheritProfiles flag is
+ * set to true, profiles defined in the annotated class will be
+ * merged with those defined in superclasses.
*
- * @param clazz
- * @return
+ * @param clazz the class for which to resolve the active profiles (must
+ * not be null)
+ * @return the set of active profiles for the specified class, including
+ * active profiles from superclasses if appropriate (never null)
*/
static String[] resolveActiveProfiles(Class> clazz) {
Assert.notNull(clazz, "Class must not be null");
- Class