title: Changing HashMap keys during iteration
body: <p>is it possible to change keys of a the same HashMap instance during iteration ? Because map entry set don't have a method entry.setKey(). Now what I can think off is create another HashMap...</p>
  
  <pre><code>MultipartParsingResult parsingResult = parseRequest(request);
  
  Map&lt;String, String[]&gt; mpParams = parsingResult.getMultipartParameters();
  Map&lt;String, String[]&gt; mpParams2 = new HashMap&lt;String, String[]&gt;();
  
  Iterator&lt;Entry&lt;String,String[]&gt;&gt; it = mpParams.entrySet().iterator();
  
  while (it.hasNext()) {
      Entry&lt;String,String[]&gt; entry = it.next();
      String name = entry.getKey();
  
      if (name.startsWith(portletNamespace)) {
          mpParams2.put(name.substring(portletNamespace.length(), name.length()), entry.getValue());
      }
      else {
          mpParams2.put(name, entry.getValue());
      }
  }
  </code></pre>