Some usages of the removed signatures

This commit is contained in:
Johan Andrén 2018-09-21 10:34:41 +02:00
parent f8d182574a
commit 10fc413238
5 changed files with 4 additions and 18 deletions

View file

@ -67,17 +67,6 @@ object PersistentBehaviors {
}
/**
* INTERNAL API
*/
@InternalApi private[akka] final class ByStateCommandHandler[Command, Event, State](
choice: State CommandHandler[Command, Event, State])
extends CommandHandler[Command, Event, State] {
override def apply(state: State, cmd: Command): Effect[Event, State] =
choice(state)(state, cmd)
}
}
trait PersistentBehavior[Command, Event, State] extends DeferredBehavior[Command] {

View file

@ -506,5 +506,4 @@ public class PersistentActorJavaDslTest extends JUnitSuite {
}
//event-wrapper
// FIXME test with by state command handler
}

View file

@ -94,10 +94,8 @@ object InDepthPersistentBehaviorSpec {
//#by-state-command-handler
private val commandHandler: (BlogState, BlogCommand) Effect[BlogEvent, BlogState] = { (state, command)
state match {
case state if state.isEmpty initial(state, command)
case state if !state.isEmpty postAdded(state, command)
}
if (state.isEmpty) initial(state, command)
else postAdded(state, command)
}
//#by-state-command-handler