Russole opened a new pull request, #22430:
URL: https://github.com/apache/kafka/pull/22430

   This PR addresses the TODO in `GlobComponent` to handle character ranges in 
Kafka shell glob components.
   
   TODO Link: 
https://github.com/apache/kafka/blob/f2f31100c4b7aef96a86e77d5ecf47ef7f9f3468/shell/src/main/java/org/apache/kafka/shell/glob/GlobComponent.java#L110
   
   `GlobComponent` already supports `*`, `?`, and `{a,b}` patterns, but 
character classes were not handled. This change translates glob character 
classes into Java regular expression character classes, including ranges and 
negated classes such as `[0-9]`, `[abc]`, `[!abc]`, and `[^abc]`.
   
   Malformed character classes such as unterminated or empty classes are 
rejected consistently with other malformed glob patterns.
   
   Unit tests were added in `GlobComponentTest` for regex translation, matching 
behavior, and malformed character classes. I also ran `./gradlew :shell:test 
--tests org.apache.kafka.shell.glob.GlobComponentTest`.


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