jetty#11789 run list distinct on the generated resources list during startup

This commit is contained in:
Jacker 2024-05-14 12:53:04 +03:00
parent a9b2da533f
commit 7c7c6e3d5e
No known key found for this signature in database
GPG Key ID: CC846B58E6BDCFF2
1 changed files with 2 additions and 1 deletions

View File

@ -485,7 +485,8 @@ public class MetaData
resources.add(null); //always apply annotations with no resource first
resources.addAll(_orderedContainerResources); //next all annotations from container path
resources.addAll(_webInfClasses); //next everything from web-inf classes
resources.addAll(getWebInfResources(isOrdered())); //finally annotations (in order) from webinf path
resources.addAll(getWebInfResources(isOrdered())); //finally annotations (in order) from webinf path
resources = resources.stream().distinct().collect(Collectors.toList()); // filter out possible duplicates
for (Resource r : resources)
{