reschke commented on code in PR #132:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/132#discussion_r1922363213
##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:
##########
@@ -1704,12 +1713,15 @@ private final class MapEntryIterator implements
Iterator<MapEntry> {
private MapEntry nextSpecial;
private boolean vanityPathPrecedence;
+ private final Function<String, List<MapEntry>>
getCurrentMapEntryForVanityPath;
- public MapEntryIterator(final String startKey, final Map<String,
List<MapEntry>> resolveMapsMap, final boolean vanityPathPrecedence) {
+ public MapEntryIterator(final String startKey, @NotNull final
List<MapEntry> globalList,
+ final Function<String, List<MapEntry>>
getCurrentMapEntryForVanityPath,
Review Comment:
We need it so (1) MapEntryIterator can be moved to a separate class without
having a dependency on MapEntries, and (2) so that the iterator can be easily
tested in unit tests without having to mock all related classes (resolvers,
factories etc)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]