Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3155

RestfulActionMapper iterates a map where it should only just do a lookup

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1.8
    • 2.1.8
    • Other
    • None
    • Patch

    Description

      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;
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            sasmito Dion Sasmito
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: