Skip to content

IncludeExcludePredicate case sensitivity inconsistency #8137

@SylvainJuge

Description

@SylvainJuge

IncludeExcludePredicate provides two methods to create instances:

  • createExactMatching for an "exact" matching.
  • createPatternMatching to 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions