James Netherton created CAMEL-22739:
---------------------------------------
Summary: camel-main: Avoid potential duplicate route resources in
DefaultRoutesCollector.findRouteResourcesFromDirectory
Key: CAMEL-22739
URL: https://issues.apache.org/jira/browse/CAMEL-22739
Project: Camel
Issue Type: Improvement
Components: camel-main
Reporter: James Netherton
Assignee: James Netherton
DefaultRoutesCollector.findRouteResourcesFromDirectory currently places
discovered route resources into an ArrayList. Depending on the
routes-include-pattern(s) used, there's the potential that duplicate resources
could get added. Hence it might be better to use a Set instead.
E.g if you have overlapping wildcard inclusion patterns, the resource resolver
will recursively match resources for the file: scheme. So you can end up with
duplicates being collected.
It's maybe a bit of an edge case, but I think we should try to avoid it
happening by default.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)