aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/runner/notification/RunNotifier.java
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2021-02-24 21:20:54 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-24 21:20:54 +0000
commit138b64feb682b90292d36002f3aff9869d6a9e4b (patch)
treefb060599e56a1ce3ccfa4cacd193406f14ba84db /src/main/java/org/junit/runner/notification/RunNotifier.java
parent99022df227f5503b68838d97e0a6b3fa5f558f1b (diff)
parent91c5e5ff9d71ebc00818b310c09b175016c36dc2 (diff)
downloadjunit-138b64feb682b90292d36002f3aff9869d6a9e4b.tar.gz
Merge changes from topic "revert-1601635-AIQYZOHWTP" am: 565f36d281 am: 23e304a839 am: 91c5e5ff9d
Original change: https://android-review.googlesource.com/c/platform/external/junit/+/1605377 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iaa51f5a85f96ec87a01eff9bc98e2274fc5a97dd
Diffstat (limited to 'src/main/java/org/junit/runner/notification/RunNotifier.java')
-rw-r--r--src/main/java/org/junit/runner/notification/RunNotifier.java41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/main/java/org/junit/runner/notification/RunNotifier.java b/src/main/java/org/junit/runner/notification/RunNotifier.java
index 752fa3b..6875f76 100644
--- a/src/main/java/org/junit/runner/notification/RunNotifier.java
+++ b/src/main/java/org/junit/runner/notification/RunNotifier.java
@@ -65,8 +65,8 @@ public class RunNotifier {
void run() {
int capacity = currentListeners.size();
- List<RunListener> safeListeners = new ArrayList<RunListener>(capacity);
- List<Failure> failures = new ArrayList<Failure>(capacity);
+ ArrayList<RunListener> safeListeners = new ArrayList<RunListener>(capacity);
+ ArrayList<Failure> failures = new ArrayList<Failure>(capacity);
for (RunListener listener : currentListeners) {
try {
notifyListener(listener);
@@ -78,7 +78,7 @@ public class RunNotifier {
fireTestFailures(safeListeners, failures);
}
- protected abstract void notifyListener(RunListener each) throws Exception;
+ abstract protected void notifyListener(RunListener each) throws Exception;
}
/**
@@ -106,41 +106,6 @@ public class RunNotifier {
}
/**
- * Invoke to tell listeners that a test suite is about to start. Runners are strongly
- * encouraged--but not required--to call this method. If this method is called for
- * a given {@link Description} then {@link #fireTestSuiteFinished(Description)} MUST
- * be called for the same {@code Description}.
- *
- * @param description the description of the suite test (generally a class name)
- * @since 4.13
- */
- public void fireTestSuiteStarted(final Description description) {
- new SafeNotifier() {
- @Override
- protected void notifyListener(RunListener each) throws Exception {
- each.testSuiteStarted(description);
- }
- }.run();
- }
-
- /**
- * Invoke to tell listeners that a test suite is about to finish. Always invoke
- * this method if you invoke {@link #fireTestSuiteStarted(Description)}
- * as listeners are likely to expect them to come in pairs.
- *
- * @param description the description of the suite test (generally a class name)
- * @since 4.13
- */
- public void fireTestSuiteFinished(final Description description) {
- new SafeNotifier() {
- @Override
- protected void notifyListener(RunListener each) throws Exception {
- each.testSuiteFinished(description);
- }
- }.run();
- }
-
- /**
* Invoke to tell listeners that an atomic test is about to start.
*
* @param description the description of the atomic test (generally a class and method name)