title: java.lang.ClassCastException with null message and cause
body: <p>I work on a project using Java 8</p>
  
  <p>We have a negative test similar to this:</p>
  
  <pre><code>public Integer g(Object data)
  {
      try
      {
          Double d = (Double)data;
      }
      catch(ClassCastException ex)
      {
          if( ex.getMessage() == null )
          {
              return 1;
          }
      }
      return 0;
  }
  
  @Test
  public void h()
  {
      Integer count = 0;
      for( Integer idx = 0; idx &lt; 100000; idx++ )
      {
          // The test
          count += g(0.7312345f);
      }
      System.out.println("Total ClassCastException's with null message: "+count);
  }
  </code></pre>
  
  <p>The negative test expects the exception java.lang.ClassCastException with message "java.lang.Float cannot be cast to java.lang.Double" and it sometimes gets null message</p>
  
  <p>I tried to debug it in eclipse but somehow when attached to debugger the exception and message were as expected all the time</p>