Fixes after review
This commit is contained in:
parent
5ddf1afb20
commit
1ebdcaca1a
3 changed files with 9 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ import java.util.LinkedList;
|
|||
import java.lang.Iterable;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import static akka.japi.util.manifest;
|
||||
import static akka.japi.Util.manifest;
|
||||
|
||||
import akka.testkit.AkkaSpec;
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ public class JavaFutureTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void BlockMustBeCallable() {
|
||||
public void blockMustBeCallable() {
|
||||
Promise<String> p = Futures.promise(system.dispatcher());
|
||||
Duration d = Duration.create(1, TimeUnit.SECONDS);
|
||||
p.success("foo");
|
||||
|
|
@ -281,7 +281,7 @@ public class JavaFutureTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void MapToMustBeCallable() {
|
||||
public void mapToMustBeCallable() {
|
||||
Promise<Object> p = Futures.promise(system.dispatcher());
|
||||
Future<String> f = p.future().mapTo(manifest(String.class));
|
||||
Duration d = Duration.create(1, TimeUnit.SECONDS);
|
||||
|
|
@ -291,7 +291,7 @@ public class JavaFutureTests {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void RecoverToMustBeCallable() {
|
||||
public void recoverToMustBeCallable() {
|
||||
final IllegalStateException fail = new IllegalStateException("OHNOES");
|
||||
Promise<Object> p = Futures.promise(system.dispatcher());
|
||||
Future<Object> f = p.future().recover(new Recover<Object>() {
|
||||
|
|
|
|||
|
|
@ -505,7 +505,7 @@ sealed trait Future[+T] extends Await.Awaitable[T] {
|
|||
* that conforms to A's erased type or a ClassCastException otherwise.
|
||||
*
|
||||
* When used from Java, to create the Manifest, use:
|
||||
* import static akka.japi.util.manifest;
|
||||
* import static akka.japi.Util.manifest;
|
||||
* future.mapTo(manifest(MyClass.class));
|
||||
*/
|
||||
final def mapTo[A](implicit m: Manifest[A]): Future[A] = {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,10 @@ object Option {
|
|||
implicit def scala2JavaOption[A](o: scala.Option[A]): Option[A] = if (o.isDefined) some(o.get) else none
|
||||
}
|
||||
|
||||
object util {
|
||||
/**
|
||||
* This class hold common utilities for Java
|
||||
*/
|
||||
object Util {
|
||||
/**
|
||||
* Given a Class returns a Scala Manifest of that Class
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue