Skip to content
Browse files

Make guard() receive a more specific type

  • Loading branch information...
1 parent 9bc3262 commit 4f01472812fcb789203c8e896ab7dded88eef323 @dgomezferro committed May 31, 2012
View
2 src/main/java/com/yahoo/pasc/MessageHandler.java
@@ -36,7 +36,7 @@
* @param receivedMessage Message to be checked
* @return true if this handler is the one that should be executed
*/
- public boolean guardPredicate(Message receivedMessage);
+ public boolean guardPredicate(M receivedMessage);
/**
* Processes a received message.
View
4 src/test/java/com/yahoo/pasc/RuntimeTest.java
@@ -380,8 +380,8 @@ public boolean equalsDeep(TMessage other) {
private static class Handler implements MessageHandler<TMessage, State, TMessage> {
@Override
- public boolean guardPredicate(Message receivedMessage) {
- return receivedMessage instanceof TMessage;
+ public boolean guardPredicate(TMessage receivedMessage) {
+ return true;
}
@Override

0 comments on commit 4f01472

Please sign in to comment.
Something went wrong with that request. Please try again.