title: Why doesn't Java tell you which pointer is null?
body: <p>I've always wondered why the JVM doesn't tell you <em>which</em> pointer (or more precisely, which variable) is null when a <code>NullPointerException</code> is thrown.</p>
  
  <p>A line number isn't specific enough because the offending line can often contain numerous variables that could have caused the error.</p>
  
  <p>Is there any compiler or JVM flag that would make these exception messages more useful?</p>