title: JAVA Find object based on its id from thread dump
body: <p>Let's say I have this line from a thread dump:</p>
  
  <pre><code>waiting to lock &lt;0x0000000301cf21a8&gt; (a foo.bar.MyClass)
  </code></pre>
  
  <p>How can I find this object? I thought calling System.identityHashCode and converting this to hex will do, but it doesn't seem to match.</p>