You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "dion sasmito (JIRA)" <ji...@apache.org> on 2009/06/13 00:20:42 UTC

[jira] Created: (WW-3155) RestfulActionMapper iterates a map where it should only just do a lookup

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.


[jira] Updated: (WW-3155) RestfulActionMapper iterates a map where it should only just do a lookup

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Resolved: (WW-3155) RestfulActionMapper iterates a map where it should only just do a lookup

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-3155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-3155.
---------------------------------

    Resolution: Fixed

fixed in trunk, thanks for reporting

> 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.