Entries in a HashMap being overwritten by completely different keys?
<p>I have a Java HashMap used to store some basic string values:</p>

<pre><code>Map&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
map.put("Id", task.getStorageId());
map.put("Name", task.getName());
map.put("Description", task.getDescription());
</code></pre>

<p>Under one usage, the <code>Id</code> entry is overwitten by the <code>Description</code> entry, everytime without fail. I have watched it in the debugger - <code>Id</code> is inserted fine, <code>Name</code> inserted fine, then when <code>Descroption</code> is inserted, it overwrites the <code>Id</code> entry. Using exactly the same code and keys in another part of the application it works with no problems. Totally confused. What is going on here? </p>

<p><strong>Edit</strong></p>

<p>Perhaps I should have mentioned (though it didn't seem relevant), this is happening on Android, not in a JVM. Could that be the issue? I also found it hard to believe but the chunk of code is as simple as the snippet provided. I will try to bundle an Android app that demonstrates it and post somewhere.</p>
