Kowshik Prakasam created KAFKA-10624:
----------------------------------------

             Summary: FeatureZNodeStatus should use sealed trait instead of 
Enumeration
                 Key: KAFKA-10624
                 URL: https://issues.apache.org/jira/browse/KAFKA-10624
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Kowshik Prakasam


In Scala, we prefer sealed traits over Enumeration since the former gives you 
exhaustiveness checking. With Scala Enumeration, you don't get a warning if you 
add a new value that is not handled in a given pattern match.

This Jira tracks refactoring enum 
[FeatureZNodeStatus|https://github.com/apache/kafka/blob/fb4f297207ef62f71e4a6d2d0dac75752933043d/core/src/main/scala/kafka/zk/ZkData.scala#L801]
 from an enum to a sealed trait. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to