This commit is contained in:
parent
31de5952b0
commit
a299b30c0b
4 changed files with 62 additions and 25 deletions
|
|
@ -48,8 +48,8 @@ public class JavaTestServer extends AllDirectives { // or import static Directiv
|
|||
);
|
||||
|
||||
final Route crash = path("crash", () ->
|
||||
path("scala", () -> completeWithFutureString(akka.dispatch.Futures.<String>failed(new Exception("Boom!")))).orElse(
|
||||
path("java", () -> completeWithFutureString(CompletableFuture.<String>supplyAsync(() -> { throw new RuntimeException("Boom!"); }))))
|
||||
path("scala", () -> completeOKWithFutureString(akka.dispatch.Futures.<String>failed(new Exception("Boom!")))).orElse(
|
||||
path("java", () -> completeOKWithFutureString(CompletableFuture.<String>supplyAsync(() -> { throw new RuntimeException("Boom!"); }))))
|
||||
);
|
||||
|
||||
final Route inner = path("inner", () ->
|
||||
|
|
@ -119,4 +119,4 @@ public class JavaTestServer extends AllDirectives { // or import static Directiv
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue