Skip to content

Commit a2ffc02

Browse files
committed
Add class-level JavaDoc; clarify description of 'isSupported()' method
1 parent fcdb562 commit a2ffc02

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/main/java/com/nordstrom/automation/junit/RunAnnouncer.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
import org.slf4j.Logger;
1111
import org.slf4j.LoggerFactory;
1212

13+
/**
14+
* This class implements a notification-enhancing extension of the standard {@link RunListener} class. This run
15+
* announcer is the source of notifications sent to attached implementations of the {@link RunWatcher} interface.
16+
* Note that <b>RunAnnouncer</b> is attached
17+
* <a href="https://github.com/Nordstrom/JUnit-Foundation#support-for-standard-junit-runlistener-providers">
18+
* automatically</a> by <b>JUnit Foundation</b>; attaching this run listener through conventional methods (Maven
19+
* or Gradle project configuration, {@code JUnitCore.addListener()}) is not only unnecessary, but will likely
20+
* suppress <b>RunWatcher</b> notifications.
21+
*/
1322
public class RunAnnouncer extends RunListener {
1423

1524
private static final Map<Object, AtomicTest<?>> RUNNER_TO_ATOMICTEST = new ConcurrentHashMap<>();
@@ -136,11 +145,11 @@ private static <T> AtomicTest<T> setTestFailure(Failure failure) {
136145
}
137146

138147
/**
139-
* Determine if the run watcher in question supports the specified atomic test.
148+
* Determine if the run watcher in question supports the data type of specified atomic test.
140149
*
141150
* @param watcher {@link RunWatcher} object
142151
* @param atomicTest {@link AtomicTest} object
143-
* @return {@code true} if the run watcher in question supports the specified atomic test; otherwise {@code false}
152+
* @return {@code true} if the specified run watcher supports the indicated data type; otherwise {@code false}
144153
*/
145154
private static boolean isSupported(RunWatcher<?> watcher, AtomicTest<?> atomicTest) {
146155
return (atomicTest == null) ? false : watcher.supportedType().isInstance(atomicTest.getIdentity());

0 commit comments

Comments
 (0)