Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8567

XWikiServletRequest.getParameterMap does nothing

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Here is the code of com.xpn.xwiki.web.XWikiServletRequest.getParameterMap()

      public Map getParameterMap()
          {
              Map newMap = new HashMap();
              Map map = this.request.getParameterMap();
              Iterator it = map.keySet().iterator();
              while (it.hasNext()) {
                  String key = (String) it.next();
                  Object value = map.get(key);
                  if (value instanceof String) {
                      newMap.put(key, filterString((String) value));
                  } else if (value instanceof String[]) {
                      newMap.put(key, filterStringArray((String[]) value));
                  } else {
                      newMap.put(key, value);
                  }
              }
              return map;
          }
      
      

      As you can see, it creates a newMap but returns map. So this code does nothing. I think it should return newMap. Not sure of the consequences for xwiki behaviour. Might be worth fixing or code cleanin if newMap is not needed anymore.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            tchize David Delbecq
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: