private ConfigAttributeDefinition lookupUrlInMap(Map requestMap, String url) {
ConfigAttributeDefinition cad = (ConfigAttributeDefinition)requestMap.get(url);
if(cad != null) {
return cad;
}
Iterator entries = requestMap.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry entry = (Map.Entry) entries.next();
Object p = entry.getKey();
boolean matched = urlMatcher.pathMatchesUrl(p, url);
if (logger.isDebugEnabled()) {
logger.debug("Candidate is: '" + url + "'; pattern is " + p + "; matched=" + matched);
}
if (matched) {
return (ConfigAttributeDefinition) entry.getValue();
}
}
return null;
}
--------------------next---------------------
阅读(150) | 评论(0) | 转发(0) |