Skip to content

Commit 05d5986

Browse files
committed
add comment for test case
1 parent 6acef0d commit 05d5986

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/io/reactivex/schedulers/NewThreadSchedulerTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,16 @@ public void run() {
116116
assertEquals(0, calls[0]);
117117
}
118118

119+
/**
120+
* Regression test to ensure there is no NPE when the worker has been disposed
121+
*/
119122
@Test
120123
public void npe() throws Exception {
121124
Scheduler s = getScheduler();
122125
NewThreadWorker w = (NewThreadWorker) s.createWorker();
123126
w.dispose();
124127

128+
//This method used to throw a NPE when the worker has been disposed and the parent is null
125129
w.scheduleActual(new Runnable() {
126130
@Override
127131
public void run() {

0 commit comments

Comments
 (0)