[ 
https://issues.apache.org/struts/browse/WW-3155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wes Wannemacher updated WW-3155:
--------------------------------

    Fix Version/s: 2.1.8

should be an easy fix, but we can look at it for the next release

> 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
>             Fix For: 2.1.8
>
>
> 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.

Reply via email to