-
Notifications
You must be signed in to change notification settings - Fork 952
Description
IncludeExcludePredicate provides two methods to create instances:
createExactMatchingfor an "exact" matching.createPatternMatchingto support*and?as wildcards/glob patterns.
However, the "exact" matching is not case-sensitive as it uses String.equalsIgnoreCase, however the pattern-matching variant IS case sensitive, which can be confusing at best because using ABC value would match abc with exact match but not *bc with pattern matching.
The configuration specification about this does not provide any guidance regarding the case-sensitivity.
I think that we should be at least consistent, so having either both case-sensitive or both case-insensitive, but not a mix.
I would suggest to make everything case-sensitive as it's more conservative and avoids unexpected behavior, also most if not all of the configuration elements is case-sensitive so that would be consistent. The downside here would be requiring verbosity in patterns if multiple case variants need to be supported, but I assume this would be marginal.
Also worth considering, we could add the ability to opt-{in,out} for case-sentivity, for example by adding a known prefix to the pattern, the downside here would be extra complexity in the documentation/specification/implementation which is probably not worth the cost.