Skip to content

Commit fabdb07

Browse files
committed
Redeclare default methods in AbstractTestExecutionListener
This commit redeclares default methods in AbstractTestExecutionListener in order to make them inlinable.
1 parent 8b023b1 commit fabdb07

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -17,13 +17,15 @@
1717
package org.springframework.test.context.support;
1818

1919
import org.springframework.core.Ordered;
20+
import org.springframework.test.context.TestContext;
2021
import org.springframework.test.context.TestExecutionListener;
2122

2223
/**
2324
* Abstract {@linkplain Ordered ordered} implementation of the
2425
* {@link TestExecutionListener} API.
2526
*
2627
* @author Sam Brannen
28+
* @author Juergen Hoeller
2729
* @since 2.5
2830
* @see #getOrder()
2931
*/
@@ -41,4 +43,71 @@ public int getOrder() {
4143
return Ordered.LOWEST_PRECEDENCE;
4244
}
4345

46+
/**
47+
* The default implementation is <em>empty</em>. Can be overridden by
48+
* subclasses as necessary.
49+
* @since 3.0
50+
*/
51+
@Override
52+
public void beforeTestClass(TestContext testContext) throws Exception {
53+
/* no-op */
54+
}
55+
56+
/**
57+
* The default implementation is <em>empty</em>. Can be overridden by
58+
* subclasses as necessary.
59+
*/
60+
@Override
61+
public void prepareTestInstance(TestContext testContext) throws Exception {
62+
/* no-op */
63+
}
64+
65+
/**
66+
* The default implementation is <em>empty</em>. Can be overridden by
67+
* subclasses as necessary.
68+
*/
69+
@Override
70+
public void beforeTestMethod(TestContext testContext) throws Exception {
71+
/* no-op */
72+
}
73+
74+
/**
75+
* The default implementation is <em>empty</em>. Can be overridden by
76+
* subclasses as necessary.
77+
* @since 5.2
78+
*/
79+
@Override
80+
public void beforeTestExecution(TestContext testContext) throws Exception {
81+
/* no-op */
82+
}
83+
84+
/**
85+
* The default implementation is <em>empty</em>. Can be overridden by
86+
* subclasses as necessary.
87+
* @since 5.2
88+
*/
89+
@Override
90+
public void afterTestExecution(TestContext testContext) throws Exception {
91+
/* no-op */
92+
}
93+
94+
/**
95+
* The default implementation is <em>empty</em>. Can be overridden by
96+
* subclasses as necessary.
97+
*/
98+
@Override
99+
public void afterTestMethod(TestContext testContext) throws Exception {
100+
/* no-op */
101+
}
102+
103+
/**
104+
* The default implementation is <em>empty</em>. Can be overridden by
105+
* subclasses as necessary.
106+
* @since 3.0
107+
*/
108+
@Override
109+
public void afterTestClass(TestContext testContext) throws Exception {
110+
/* no-op */
111+
}
112+
44113
}

0 commit comments

Comments
 (0)