title: Use Objects.hash() or own hashCode() implementation?
body: <p>I have recently discovered the <a href="https://docs.oracle.com/javase/7/docs/api/java/util/Objects.html#hash(java.lang.Object...)" rel="noreferrer"><code>Objects.hash()</code></a> method.</p>
  
  <p>My first thought was, that this tidies up your <code>hashCode()</code> implementation a lot. See the following example:</p>
  
  <pre><code>@Override
  //traditional
  public int hashCode() {
      int hash = 5;
      hash = 67 * hash + (int)(this.id ^ (this.id &gt;&gt;&gt; 32));
      hash = 67 * hash + (int)(this.timestamp ^ (this.timestamp &gt;&gt;&gt; 32));
      hash = 67 * hash + Objects.hashCode(this.severity);
      hash = 67 * hash + Objects.hashCode(this.thread);
      hash = 67 * hash + Objects.hashCode(this.classPath);
      hash = 67 * hash + Objects.hashCode(this.message);
      return hash;
  }
  
  @Override
  //lazy
  public int hashCode() {
      return Objects.hash(id, timestamp, severity, thread, classPath, message);
  }
  </code></pre>
  
  <p>Although I have to say that this seems too good to be true. Also I've never seen this usage.</p>
  
  <p>Are there any downsides of using <code>Objects.hash()</code> compared to implementing your own hash code? When would I choose each of those approaches?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Although this topic is marked as resolved, feel free to keep posting answers that provide new information and concerns.</p>