fabric8io/fabric8 — pull request #1430 by danbev (2014-05-19 13:28:47+00:00)
Title: MappingRuleResolver is dependant on HashMap's values ordering.

Motivation:
When testing the ProxyServlet I noticed that it behaves differently when
running Java 7 vs Java 8.

If one defines the following rules:
/members -> members
/members/{id} -> members/{id}

MappingRuleResolver calls mappingRules.getMappingRules.values() which
returns the following:
Java 7 Java 8
[0] /members [0] /members/{id}
[1] /members/{id} [1] /members

UriTemplate will match /members for Java 7 even if the actual request
path is /members/10002 for example.

Modifications:
I've updated UriTemplate's matches method to try to take into account
that there might be additional request paths to consider and if so
return null and allow the caller to try matching again using the next
rule (if any).