Repository: wicket Updated Branches: refs/heads/master 9a2e5878c -> 1fbff434d
Make use of the fact that CompoundRequestMapper implements Iterable Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1fbff434 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1fbff434 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1fbff434 Branch: refs/heads/master Commit: 1fbff434d0037e892fecdcdab6a1a6fd73839cdc Parents: 9a2e587 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Mon Mar 13 21:33:18 2017 +0100 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Mon Mar 13 21:34:01 2017 +0100 ---------------------------------------------------------------------- .../apache/wicket/request/mapper/CompoundRequestMapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/1fbff434/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java ---------------------------------------------------------------------- diff --git a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java index c4007e8..68a4b38 100644 --- a/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java +++ b/wicket-request/src/main/java/org/apache/wicket/request/mapper/CompoundRequestMapper.java @@ -128,7 +128,7 @@ public class CompoundRequestMapper implements ICompoundRequestMapper { List<MapperWithScore> list = new ArrayList<>(mappers.size()); - for (IRequestMapper mapper : mappers) + for (IRequestMapper mapper : this) { int score = mapper.getCompatibilityScore(request); list.add(new MapperWithScore(mapper, score)); @@ -205,7 +205,7 @@ public class CompoundRequestMapper implements ICompoundRequestMapper @Override public Url mapHandler(final IRequestHandler handler) { - for (IRequestMapper mapper : mappers) + for (IRequestMapper mapper : this) { Url url = mapper.mapHandler(handler); if (url != null) @@ -225,7 +225,7 @@ public class CompoundRequestMapper implements ICompoundRequestMapper public int getCompatibilityScore(final Request request) { int score = Integer.MIN_VALUE; - for (IRequestMapper mapper : mappers) + for (IRequestMapper mapper : this) { score = Math.max(score, mapper.getCompatibilityScore(request)); }
