Renaming onResult to onSuccess and onException to onFailure
This commit is contained in:
parent
2d418c188f
commit
67c782f82c
6 changed files with 14 additions and 14 deletions
|
|
@ -60,7 +60,7 @@ public class JavaFutureTests {
|
|||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
Promise<String> cf = Futures.promise(system.dispatcher());
|
||||
Future<String> f = cf;
|
||||
f.onResult(new Procedure<String>() {
|
||||
f.onSuccess(new Procedure<String>() {
|
||||
public void apply(String result) {
|
||||
if (result.equals("foo"))
|
||||
latch.countDown();
|
||||
|
|
@ -77,7 +77,7 @@ public class JavaFutureTests {
|
|||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
Promise<String> cf = Futures.promise(system.dispatcher());
|
||||
Future<String> f = cf;
|
||||
f.onException(new Procedure<Throwable>() {
|
||||
f.onFailure(new Procedure<Throwable>() {
|
||||
public void apply(Throwable t) {
|
||||
if (t instanceof NullPointerException)
|
||||
latch.countDown();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue