[
https://issues.apache.org/jira/browse/WICKET-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542487
]
Johan Compagner commented on WICKET-753:
----------------------------------------
the order is not random!
this is the map:
map = new TreeMap(LENGTH_COMPARATOR);
it is sorted based on the string "length" of the mount point.
so that "/foo/bar" is matched before "/foo"
Maybe it is better to test if a class has a direct mount hit before also
testing if a super class has a mount hit..
Because i think people shouldn't start wondering how they add all there mount
points.
> mounts stored in non-ordered map
> --------------------------------
>
> Key: WICKET-753
> URL: https://issues.apache.org/jira/browse/WICKET-753
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta3
> Reporter: Jonathan Locke
> Assignee: Jonathan Locke
> Priority: Minor
> Fix For: 1.3.0-final
>
>
> Because WebRequestCodingStrategy now uses a map to store mounted encoders (it
> was meant to be a list for exactly the reason this bug is being submitted),
> it is no longer possible to override encoders based on subclasses. For
> example, if you mount Foo on "/foo" and Foo has subclasses Bar and Baz, those
> subclasses are also mounted on "/foo", which is good. But then mounting Bar
> on "/bar" does not (or at least MAY not) override this functionality even if
> you install it before the "/foo" mount (which i would expect to work). To
> resolve this issue, encoders ought to be searched for a match in the order
> that they were added and not in some random order defined by the map they are
> being stored in.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.