Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swing scheduler #254

Merged
merged 11 commits into from
May 6, 2013
Prev Previous commit
Next Next commit
fixed formatting and removed superfluous checks
jmhofer committed Apr 27, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b34091e15613d302f15686c68b715b0feae3de96
16 changes: 7 additions & 9 deletions rxjava-core/src/main/java/rx/concurrency/SwingScheduler.java
Original file line number Diff line number Diff line change
@@ -87,10 +87,8 @@ private void setTimer(Timer timer) {
}

@Override
public void actionPerformed(@SuppressWarnings("unused") ActionEvent e) {
if (timer != null) {
timer.stop();
}
public void actionPerformed(ActionEvent e) {
timer.stop();
sub.set(action.call(SwingScheduler.this, state));
}
}
@@ -112,7 +110,7 @@ public void call() {
}
});
}

public static class UnitTest {
@Test
public void testNestedActions() throws InterruptedException, InvocationTargetException {
@@ -155,10 +153,10 @@ public void call() {

scheduler.schedule(thirdAction);
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
// nothing to do, we're just waiting here for the event queue to be emptied
}
@Override
public void run() {
// nothing to do, we're just waiting here for the event queue to be emptied
}
});

inOrder.verify(thirdStepStart, times(1)).call();