title: Why java TreeMap.entrySet returns a set of SimpleImmutableEntry?
body: <p>I have a java application installed on 2 different servers running with java 1.6.0_22-b04 sun and tomcat 6.0.32</p>
  
  <p>The staging server is causing me headaches with the following error :</p>
  
  <pre><code>java.lang.UnsupportedOperationException : null
     java.util.AbstractMap$SimpleImmutableEntry.setValue (AbstractMap.java:726)
  </code></pre>
  
  <p>Here's the code raising this exception</p>
  
  <pre><code>for (Entry&lt;Integer, BigDecimal&gt; entry : map.entrySet()) {
    entry.setValue(new BigDecimal("999"));
  }
  </code></pre>
  
  <p>I'm only having this problem on this server. Everything is fine locally and on the other server with the same code.</p>
  
  <p>I found lots of results on google about this exception but they were all linked to hudson.</p>