- if(serializable instanceof CanCommitTransactionReply) {
- return (CanCommitTransactionReply)serializable;
- } else {
- ThreePhaseCommitCohortMessages.CanCommitTransactionReply serialized =
- (ThreePhaseCommitCohortMessages.CanCommitTransactionReply) serializable;
- return serialized.getCanCommit() ? YES : NO;
- }
+ Preconditions.checkArgument(serializable instanceof CanCommitTransactionReply);
+ return (CanCommitTransactionReply)serializable;