chia7712 commented on code in PR #16609:
URL: https://github.com/apache/kafka/pull/16609#discussion_r1683689474


##########
core/src/test/scala/unit/kafka/zk/EmbeddedZookeeper.scala:
##########
@@ -54,6 +53,12 @@ class EmbeddedZookeeper extends Closeable with Logging {
     // Also shuts down ZooKeeperServer
     CoreUtils.swallow(factory.shutdown(), this)
 
+    val sessionTracker: SessionTrackerImpl = 
zookeeper.getSessionTracker.asInstanceOf[SessionTrackerImpl]

Review Comment:
   Could you please use match pattern instead of casting? That can protect 
casting error if the underlay instance is not `SessionTrackerImpl`



-- 
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