Skip to content

Commit 2817dce

Browse files
committed
Polish @DirtiesContext Javadoc
1 parent 698acd3 commit 2817dce

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,23 +31,15 @@
3131
*
3232
* <p>Use this annotation if a test has modified the context &mdash; for
3333
* example, by modifying the state of a singleton bean, modifying the state
34-
* of an embedded database, etc. Subsequent tests that request the same
35-
* context will be supplied a new context.
34+
* of an embedded database, etc. Subsequent tests that request the same context
35+
* will be supplied a new context.
3636
*
3737
* <p>{@code @DirtiesContext} may be used as a class-level and method-level
3838
* annotation within the same class or class hierarchy. In such scenarios, the
3939
* {@code ApplicationContext} will be marked as <em>dirty</em> before or
4040
* after any such annotated method as well as before or after the current test
4141
* class, depending on the configured {@link #methodMode} and {@link #classMode}.
4242
*
43-
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
44-
* <em>composed annotations</em>.
45-
*
46-
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
47-
* enclosing test class by default. See
48-
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
49-
* for details.
50-
*
5143
* <h3>Supported Test Phases</h3>
5244
* <ul>
5345
* <li><strong>Before current test class</strong>: when declared at the class
@@ -70,9 +62,18 @@
7062
* </ul>
7163
*
7264
* <p>{@code BEFORE_*} modes are supported by the
73-
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener DirtiesContextBeforeModesTestExecutionListener};
74-
* {@code AFTER_*} modes are supported by the
75-
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener DirtiesContextTestExecutionListener}.
65+
* {@link org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener
66+
* DirtiesContextBeforeModesTestExecutionListener}; {@code AFTER_*} modes are supported by the
67+
* {@link org.springframework.test.context.support.DirtiesContextTestExecutionListener
68+
* DirtiesContextTestExecutionListener}.
69+
*
70+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
71+
* <em>composed annotations</em>.
72+
*
73+
* <p>As of Spring Framework 5.3, this annotation will be inherited from an
74+
* enclosing test class by default. See
75+
* {@link org.springframework.test.context.NestedTestConfiguration @NestedTestConfiguration}
76+
* for details.
7677
*
7778
* @author Sam Brannen
7879
* @author Rod Johnson

0 commit comments

Comments
 (0)