RestfulActionMapper iterates a map where it should only just do a lookup
------------------------------------------------------------------------
Key: WW-3155
URL: https://issues.apache.org/struts/browse/WW-3155
Project: Struts 2
Issue Type: Improvement
Components: Other
Affects Versions: 2.1.7
Reporter: dion sasmito
Priority: Trivial
getUriFromActionMapping in RestfulActionMapper does a map iteration where a
simple lookup will do
Proposed solution:
public String getUriFromActionMapping2(ActionMapping mapping) {
String base = mapping.getNamespace() + mapping.getName();
Object value;
if ((value = mapping.getParams().get(mapping.getName() + "Id")) != null) {
base = base + "/" + value;
}
return base;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.