Skip to content

Commit da3eb58

Browse files
committed
[SPR-5995] Renamed makeNotifier() to springMakeNotifier() in order to allow compatibility with JUnit 4.5, 4.6, and 4.7.
1 parent 5a55b83 commit da3eb58

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ protected Object createTest() throws Exception {
228228
*/
229229
@Override
230230
protected void runChild(FrameworkMethod frameworkMethod, RunNotifier notifier) {
231-
EachTestNotifier eachNotifier = makeNotifier(frameworkMethod, notifier);
231+
EachTestNotifier eachNotifier = springMakeNotifier(frameworkMethod, notifier);
232232
if (isTestMethodIgnored(frameworkMethod)) {
233233
eachNotifier.fireTestIgnored();
234234
return;
@@ -249,7 +249,15 @@ protected void runChild(FrameworkMethod frameworkMethod, RunNotifier notifier) {
249249
}
250250
}
251251

252-
private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) {
252+
/**
253+
* <code>springMakeNotifier()</code> is an exact copy of
254+
* {@link BlockJUnit4ClassRunner BlockJUnit4ClassRunner's}
255+
* <code>makeNotifier()</code> method, but we have decided to prefix it with
256+
* "spring" and keep it <code>private</code> in order to avoid the
257+
* compatibility clashes that were introduced in JUnit between versions 4.5,
258+
* 4.6, and 4.7.
259+
*/
260+
private EachTestNotifier springMakeNotifier(FrameworkMethod method, RunNotifier notifier) {
253261
Description description = describeChild(method);
254262
return new EachTestNotifier(notifier, description);
255263
}

0 commit comments

Comments
 (0)