mimaison commented on a change in pull request #8238: URL: https://github.com/apache/kafka/pull/8238#discussion_r413794118
########## File path: core/src/main/scala/kafka/admin/ConsumerGroupCommand.scala ########## @@ -84,6 +87,15 @@ object ConsumerGroupCommand extends Logging { } } + def consumerGroupStatesFromString(input: String): List[ConsumerGroupState] = { + val parsedStates = input.split(',').map(s => ConsumerGroupState.parse(s.trim.toLowerCase.capitalize)).toSet.toList + if (parsedStates.contains(ConsumerGroupState.UNKNOWN)) { + val validStates = ConsumerGroupState.values().filter(_ != ConsumerGroupState.UNKNOWN) + throw new IllegalArgumentException(s"Invalid state list '$input'. Valid states are: ${validStates.mkString(",")}") Review comment: I've added the missing space aftter the comma. I'll play a bit more with the error handling and see what we can do ---------------------------------------------------------------- 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