-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
When we provide config like:
@EnableIntegrationManagement(observationPatterns ={ "!notObserved", "*" })
that HashSet in the IntegrationManagementConfiguration.obtainObservationPatterns() makes specific pattern useless: the common * is moved to the first position and when we call PatternMatchUtils.smartMatch(), this * always wins.
That is according to Javadocs:
* Pattern match against the supplied patterns; also supports negated ('!')
* patterns. First match wins (positive or negative).
* To match the names starting with {@code !} symbol,
* you have to escape it prepending with the {@code \} symbol in the pattern definition.
Revise the logic in the IntegrationManagementConfiguration.obtainObservationPatterns() to retain order of the provided patterns.
Or even make it smarter to ignore all the regular patterns if common * is present.
Plus move * to the end of the final array to let all those negative patterns make their decision.