pivotal-jbarrett commented on a change in pull request #7262:
URL: https://github.com/apache/geode/pull/7262#discussion_r819192956



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/TXRemoteCommitMessage.java
##########
@@ -65,7 +65,8 @@ public static RemoteCommitResponse send(Cache cache, int 
txUniqId,
       InternalDistributedMember onBehalfOfClientMember, DistributedMember 
recipient) {
     final InternalDistributedSystem system =
         (InternalDistributedSystem) cache.getDistributedSystem();
-    final Set<DistributedMember> recipients = Collections.singleton(recipient);
+    final Set<InternalDistributedMember> recipients =
+        Collections.singleton((InternalDistributedMember) recipient);

Review comment:
       We are inconsistent in our use of the interface vs the concrete class. I 
tried to keep the barrier as close to where the explicit cast was going to take 
place but it's complicated. In this case, all values in the set get blindly 
cast to `InternalDistributedMember`, I felt it was better to have the cast 
happen on the singular insert into the set and have the set properly typed for 
the usage. We need a better plan for internal interface/class casting overall.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to