smiklosovic commented on code in PR #3638: URL: https://github.com/apache/cassandra/pull/3638#discussion_r1826171653
########## test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java: ########## @@ -57,8 +60,8 @@ public class IsolatedJmx private JMXServerUtils.JmxRegistry registry; private RMIJRMPServerImpl jmxRmiServer; private MBeanWrapper.InstanceMBeanWrapper wrapper; - private RMIClientSocketFactoryImpl clientSocketFactory; - private CollectingRMIServerSocketFactoryImpl serverSocketFactory; + private RMIClientSocketFactory clientSocketFactory; Review Comment: @maulin-vasavada I am not sure how complicated it would be to rewokr kthat but if not possible then you should check it with `instanceof` before casting it like that. Now you assume what happens outside of this class. You assume that you will put `RMICloseableSocketFactory` into `socketFactories`. ########## test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java: ########## @@ -57,8 +60,8 @@ public class IsolatedJmx private JMXServerUtils.JmxRegistry registry; private RMIJRMPServerImpl jmxRmiServer; private MBeanWrapper.InstanceMBeanWrapper wrapper; - private RMIClientSocketFactoryImpl clientSocketFactory; - private CollectingRMIServerSocketFactoryImpl serverSocketFactory; + private RMIClientSocketFactory clientSocketFactory; Review Comment: @maulin-vasavada I am not sure how complicated it would be to rework kthat but if not possible then you should check it with `instanceof` before casting it like that. Now you assume what happens outside of this class. You assume that you will put `RMICloseableSocketFactory` into `socketFactories`. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org