diff --git a/akka-actor/src/main/java/akka/japi/pf/Match.java b/akka-actor/src/main/java/akka/japi/pf/Match.java index d7743098b4..2a86c7efcf 100644 --- a/akka-actor/src/main/java/akka/japi/pf/Match.java +++ b/akka-actor/src/main/java/akka/japi/pf/Match.java @@ -13,8 +13,8 @@ import scala.PartialFunction; * * @param the input type, that this PartialFunction will be applied to * @param the return type, that the results of the application will have - *

- * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. + * + * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. */ public class Match extends AbstractMatch { diff --git a/akka-actor/src/main/java/akka/japi/pf/PFBuilder.java b/akka-actor/src/main/java/akka/japi/pf/PFBuilder.java index bb96c43d5f..e03fe5e7cb 100644 --- a/akka-actor/src/main/java/akka/japi/pf/PFBuilder.java +++ b/akka-actor/src/main/java/akka/japi/pf/PFBuilder.java @@ -9,8 +9,8 @@ package akka.japi.pf; * * @param the input type, that this PartialFunction will be applied to * @param the return type, that the results of the application will have - *

- * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. + * + * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. */ public final class PFBuilder extends AbstractPFBuilder { diff --git a/akka-actor/src/main/java/akka/japi/pf/ReceiveBuilder.java b/akka-actor/src/main/java/akka/japi/pf/ReceiveBuilder.java index 9ec78a29f7..54dc805f5d 100644 --- a/akka-actor/src/main/java/akka/japi/pf/ReceiveBuilder.java +++ b/akka-actor/src/main/java/akka/japi/pf/ReceiveBuilder.java @@ -6,29 +6,29 @@ package akka.japi.pf; /** * Used for building a partial function for {@link akka.actor.Actor#receive() Actor.receive()}. - *

+ * * There is both a match on type only, and a match on type and predicate. - *

+ * * Inside an actor you can use it like this with Java 8 to define your receive method. - *

+ *

* Example: *

- *
- * @Override public Actor() {
- * receive(ReceiveBuilder.
- * match(Double.class, d -> {
- * sender().tell(d.isNaN() ? 0 : d, self());
- * }).
- * match(Integer.class, i -> {
- * sender().tell(i * 10, self());
- * }).
- * match(String.class, s -> s.startsWith("foo"), s -> {
- * sender().tell(s.toUpperCase(), self());
- * }).build()
- * );
+ * @Override
+ * public Actor() {
+ *   receive(ReceiveBuilder.
+ *     match(Double.class, d -> {
+ *       sender().tell(d.isNaN() ? 0 : d, self());
+ *     }).
+ *     match(Integer.class, i -> {
+ *       sender().tell(i * 10, self());
+ *     }).
+ *     match(String.class, s -> s.startsWith("foo"), s -> {
+ *       sender().tell(s.toUpperCase(), self());
+ *     }).build()
+ *   );
  * }
  * 
- *

+ * * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. */ public class ReceiveBuilder { diff --git a/akka-actor/src/main/java/akka/japi/pf/UnitMatch.java b/akka-actor/src/main/java/akka/japi/pf/UnitMatch.java index 8ad187f1e1..e7aa18e9a0 100644 --- a/akka-actor/src/main/java/akka/japi/pf/UnitMatch.java +++ b/akka-actor/src/main/java/akka/japi/pf/UnitMatch.java @@ -15,8 +15,8 @@ import scala.runtime.BoxedUnit; * void methods to {@link scala.runtime.BoxedUnit}. * * @param the input type, that this PartialFunction will be applied to - *

- * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. + * + * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. */ public class UnitMatch extends AbstractMatch { diff --git a/akka-actor/src/main/java/akka/japi/pf/UnitPFBuilder.java b/akka-actor/src/main/java/akka/japi/pf/UnitPFBuilder.java index 9f8e833f02..e97b13f865 100644 --- a/akka-actor/src/main/java/akka/japi/pf/UnitPFBuilder.java +++ b/akka-actor/src/main/java/akka/japi/pf/UnitPFBuilder.java @@ -12,8 +12,8 @@ import scala.runtime.BoxedUnit; * void methods to {@link scala.runtime.BoxedUnit}. * * @param the input type, that this PartialFunction to be applied to - *

- * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. + * + * This is an EXPERIMENTAL feature and is subject to change until it has received more real world testing. */ public final class UnitPFBuilder extends AbstractPFBuilder { @@ -47,7 +47,7 @@ public final class UnitPFBuilder extends AbstractPFBuilder { } /** - * Add a new case statement to this b uilder. + * Add a new case statement to this builder. * * @param type a type to match the argument against * @param predicate a predicate that will be evaluated on the argument if the type matches diff --git a/akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/InitializationDocTest.java b/akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/InitializationDocTest.java index 68ed0602c8..b60313ce35 100644 --- a/akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/InitializationDocTest.java +++ b/akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/InitializationDocTest.java @@ -102,7 +102,7 @@ public class InitializationDocTest { public void testGenericActor() { new JavaTestKit(system) {{ ActorRef genericTestActor = system.actorOf(Props.create(GenericActor.class), "genericActor"); - GenericMessage genericMessage = new GenericMessage<>("a"); + GenericMessage genericMessage = new GenericMessage("a"); genericTestActor.tell(genericMessage, getRef()); expectMsgEquals("A"); @@ -113,8 +113,8 @@ public class InitializationDocTest { public void actorShouldNotRespondForEmptyMessage() { new JavaTestKit(system) {{ ActorRef genericTestActor = system.actorOf(Props.create(GenericActorWithPredicate.class), "genericActorWithPredicate"); - GenericMessage emptyGenericMessage = new GenericMessage<>(""); - GenericMessage nonEmptyGenericMessage = new GenericMessage<>("a"); + GenericMessage emptyGenericMessage = new GenericMessage(""); + GenericMessage nonEmptyGenericMessage = new GenericMessage("a"); genericTestActor.tell(emptyGenericMessage, getRef()); expectNoMsg();