Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3d28f58

Browse files
committedOct 12, 2020
Improve Javadoc for @NestedTestConfiguration
See gh-19930
1 parent e9d0dd1 commit 3d28f58

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎spring-test/src/main/java/org/springframework/test/context/NestedTestConfiguration.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@
3333
* not propagate to inner test classes (see {@link EnclosingConfiguration#OVERRIDE}).
3434
* Consequently, inner test classes will have to declare their own Spring test
3535
* configuration annotations. If you wish for an inner test class to inherit
36-
* configuration from its enclosing class, annotate the enclosing class with
37-
* {@code @NestedTestConfiguration(EnclosingConfiguration.INHERIT)}.
36+
* configuration from its enclosing class, annotate either the inner test class
37+
* or the enclosing class with
38+
* {@code @NestedTestConfiguration(EnclosingConfiguration.INHERIT)}. Note that
39+
* a {@code @NestedTestConfiguration(...)} declaration is inherited within the
40+
* superclass hierarchy as well as within the enclosing class hierarchy. Thus,
41+
* there is no need to redeclare the annotation unless you wish to switch the
42+
* mode.
3843
*
3944
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
4045
* <em>composed annotations</em>.

0 commit comments

Comments
 (0)
Please sign in to comment.