Never mind,

I'd say the implentation is correct and the javadoc is good enough.
It's probably that on my first reading atempt I got hooked on
'mountsOnPath is sorted by longest paths first to improve resolution of possible path
    * conflicts. '

which made me expect something like:

           public int compare(Object o1, Object o2)
           {
                   final String lhs = (String)o1;
                   final String rhs = (String)o2;
return lhs.length() == rhs.length() ? rhs.compareTo(lhs) : rhs.length() - lhs.length();
           }

cheers, have a nice weekend,

Martin


martinf schrieb:
Hi,

the insource documentation of WebRuquestCodingStrategy.mountsOnPath and
WebRequestCodingStrategy.MountsMap.LENGTH_COMPARATOR go a long way to
explain that longest Strings are sorted first. If I understand
LENGTH_COMPARATOR's implementation right, it only reverses String's lexical
sort order, like reading your Dictionary from last to first page.

mf

Reply via email to