title: Map returning reference in java
body: <p>we have a map</p>
  
  <pre><code> final Map&lt;String, Date&gt; releaseDate = new HashMap&lt;String, Date&gt;();
    ....#code to populate Map
    I have an object Movie movie =new Movie()  
  </code></pre>
  
  <p>when I set the value movie.setReleaseDate(releaseDate.get("test");</p>
  
  <p>I add this in xml file it's showing as </p>
  
  <p><code>&lt;releaseDate reference="../../../movie/releaseDate"/&gt;</code></p>
  
  <p>it's showing the reference not the value.</p>
  
  <p>when I try like </p>
  
  <pre><code> Date date = (Date)releaseDate.get("test").clone();
    movie.setReleaseDate(date);
  </code></pre>
  
  <p>then in xml file showing the correct value
  <code>&lt;releaseDate&gt;2011-07-31 23:00:00.0 UTC &lt;/releaseDate&gt;</code></p>
  
  <p>why map is returning the reference.How can I overcome this issue?</p>
  
  <p>Thanks</p>