Skip to content

Commit c03e70b

Browse files
committed
JavaDoc updates; remove unused arguments and imports
1 parent 7b50753 commit c03e70b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
import org.junit.runners.model.RunnerScheduler;
1313
import org.junit.runners.model.TestClass;
14+
import org.slf4j.Logger;
15+
import org.slf4j.LoggerFactory;
1416

1517
import net.bytebuddy.implementation.bind.annotation.SuperCall;
1618
import net.bytebuddy.implementation.bind.annotation.This;
@@ -22,6 +24,7 @@
2224
@SuppressWarnings("squid:S1118")
2325
public class CreateTestClass {
2426
private static final ServiceLoader<TestClassWatcher> classWatcherLoader;
27+
private static final Logger LOGGER = LoggerFactory.getLogger(CreateTestClass.class);
2528
private static final Map<TestClass, Object> TESTCLASS_TO_RUNNER = new ConcurrentHashMap<>();
2629

2730
static {
@@ -38,6 +41,7 @@ public class CreateTestClass {
3841
*/
3942
public static TestClass intercept(@This final Object runner, @SuperCall final Callable<?> proxy)
4043
throws Exception {
44+
4145
TestClass testClass = (TestClass) proxy.call();
4246
TESTCLASS_TO_RUNNER.put(testClass, runner);
4347

@@ -58,20 +62,20 @@ public static TestClass intercept(@This final Object runner, @SuperCall final Ca
5862
private static void attachRunnerScheduler(final TestClass testClass, final Object runner) {
5963
try {
6064
RunnerScheduler scheduler = getFieldValue(runner, "scheduler");
61-
setFieldValue(runner, "scheduler", createRunnerScheduler(testClass, runner, scheduler));
65+
setFieldValue(runner, "scheduler", createRunnerScheduler(testClass, scheduler));
6266
} catch (IllegalAccessException | NoSuchFieldException | SecurityException | IllegalArgumentException e) {
67+
LOGGER.warn("Unable to attach notifying runner scheduler", e);
6368
}
6469
}
6570

6671
/**
67-
* Create lifecycle-reporting runner scheduler, which forwards to the previous scheduler if specified.
72+
* Create notifying runner scheduler, which forwards to the previous scheduler if specified.
6873
*
6974
* @param testClass {@link TestClass} object that was just created
70-
* @param runner {@link ParentRunner} for the specified test class
7175
* @param scheduler runner scheduler that's currently attached to the specified runner (may be {@code null})
72-
* @return new lifecycle-reporting runner scheduler
76+
* @return new notifying runner scheduler
7377
*/
74-
private static RunnerScheduler createRunnerScheduler(final TestClass testClass, final Object runner, final RunnerScheduler scheduler) {
78+
private static RunnerScheduler createRunnerScheduler(final TestClass testClass, final RunnerScheduler scheduler) {
7579
return new RunnerScheduler() {
7680
private AtomicBoolean scheduled = new AtomicBoolean(false);
7781

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.nordstrom.automation.junit;
22

3-
import org.junit.runners.model.FrameworkMethod;
43
import org.junit.runners.model.TestClass;
54

65
/**

0 commit comments

Comments
 (0)