- for(int i = 0; i < expReplies.length; i++) {
- Object expReply = expReplies[i];
- boolean found = false;
- Iterator<?> iter = futureResults.iterator();
- while(iter.hasNext()) {
- Object actual = iter.next();
- if(CommitTransactionReply.SERIALIZABLE_CLASS.isInstance(expReply) &&
- CommitTransactionReply.SERIALIZABLE_CLASS.isInstance(actual)) {
- found = true;
- } else if(expReply instanceof ActorSelection && Objects.equal(expReply, actual)) {
- found = true;
- } else if(expReply instanceof Class && ((Class<?>)expReply).isInstance(actual)) {
- found = true;
- }
-
- if(found) {
- iter.remove();
- break;
- }
+ for (Object expReply : expReplies) {
+ boolean found = false;
+ Iterator<?> iter = futureResults.iterator();
+ while (iter.hasNext()) {
+ Object actual = iter.next();
+ if (CommitTransactionReply.isSerializedType(expReply)
+ && CommitTransactionReply.isSerializedType(actual)
+ || expReply instanceof ActorSelection && Objects.equals(expReply, actual)) {
+ found = true;
+ } else if (expReply instanceof Class && ((Class<?>) expReply).isInstance(actual)) {
+ found = true;