Issue #4776 - Making PathMappings._mappings use LogicalDeclaration sort

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Joakim Erdfelt 2020-04-22 15:53:41 +02:00 committed by Ludovic Orban
parent 79e76544ff
commit 0234ead671
1 changed files with 1 additions and 2 deletions

View File

@ -46,7 +46,7 @@ import org.eclipse.jetty.util.log.Logger;
public class PathMappings<E> implements Iterable<MappedResource<E>>, Dumpable
{
private static final Logger LOG = Log.getLogger(PathMappings.class);
private final Set<MappedResource<E>> _mappings = new TreeSet<>();
private final Set<MappedResource<E>> _mappings = new TreeSet<>(LogicalDeclarationComparator.INSTANCE);
private Trie<MappedResource<E>> _exactMap = new ArrayTernaryTrie<>(false);
private Trie<MappedResource<E>> _prefixMap = new ArrayTernaryTrie<>(false);
@ -116,7 +116,6 @@ public class PathMappings<E> implements Iterable<MappedResource<E>>, Dumpable
break;
}
}
ret.sort(LogicalDeclarationComparator.INSTANCE);
return ret;
}