chia7712 commented on a change in pull request #9643: URL: https://github.com/apache/kafka/pull/9643#discussion_r529325622
########## File path: core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala ########## @@ -151,21 +149,22 @@ object ConsumerGroupCommand extends Logging { private[admin] case class CsvUtils() { val mapper = new CsvMapper with ScalaObjectMapper mapper.registerModule(DefaultScalaModule) - def readerFor[T <: CsvRecord: ClassTag] = { + def readerFor[T <: CsvRecord : ClassTag] = { val schema = getSchema[T] val clazz = implicitly[ClassTag[T]].runtimeClass mapper.readerFor(clazz).`with`(schema) } - def writerFor[T <: CsvRecord: ClassTag] = { + def writerFor[T <: CsvRecord : ClassTag] = { val schema = getSchema[T] val clazz = implicitly[ClassTag[T]].runtimeClass mapper.writerFor(clazz).`with`(schema) } - private def getSchema[T <: CsvRecord: ClassTag] = { + private def getSchema[T <: CsvRecord : ClassTag] = { val clazz = implicitly[ClassTag[T]].runtimeClass - val fields = clazz match { - case _ if classOf[CsvRecordWithGroup] == clazz => CsvRecordWithGroup.fields - case _ if classOf[CsvRecordNoGroup] == clazz => CsvRecordNoGroup.fields + val fields = { Review comment: useless brackets ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org