File tree 4 files changed +26
-6
lines changed
4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change
1
+ package org .junit .experimental .annotations ;
2
+
3
+ import java .lang .annotation .*;
4
+
5
+ /**
6
+ * Implementation is guaranteed to be free of race conditions
7
+ * when accessed by multiple threads simultaneously.
8
+ *
9
+ * @author Tibor Digana (tibor17)
10
+ * @version 4.12
11
+ * @since 4.12
12
+ */
13
+ @ Documented
14
+ @ Target (ElementType .TYPE )
15
+ @ Retention (RetentionPolicy .RUNTIME )
16
+ public @interface ThreadSafe {
17
+ }
Original file line number Diff line number Diff line change 4
4
import org .junit .runner .Result ;
5
5
6
6
/**
7
- * SynchronizedRunListener decorates {@link RunListener} and
8
- * has all methods synchronized.
7
+ * SynchronizedRunListener decorates {@link RunListener}, has all methods
8
+ * synchronized and is <em>not</em> public.
9
+ * <p>
10
+ * Due to backward compatibility, this synchronized listener behaves thread
11
+ * safe as {@link RunListener} in the old synchronized {@link RunNotifier}.
9
12
*
10
13
* @author Tibor Digana (tibor17)
11
14
* @version 4.12
12
15
* @since 4.12
16
+ *
17
+ * @see RunNotifier
13
18
*/
14
19
@ Concurrent
15
20
final class SynchronizedRunListener extends RunListener {
Original file line number Diff line number Diff line change 1
- // Copyright 2013 Google Inc. All Rights Reserved.
2
-
3
1
package org .junit .runner .notification ;
4
2
5
3
import static org .hamcrest .CoreMatchers .instanceOf ;
Original file line number Diff line number Diff line change 173
173
StopwatchTest .class ,
174
174
RunNotifierTest .class ,
175
175
ConcurrentRunNotifierTest .class ,
176
- SynchronizedRunListenerTest .class ,
177
- AddRemoveListenerTest .class
176
+ AddRemoveListenerTest .class ,
177
+ SynchronizedRunListenerTest .class
178
178
})
179
179
public class AllTests {
180
180
public static Test suite () {
You can’t perform that action at this time.
0 commit comments