7037085: Add hashCode() to Timestamp to address Findbugs warning
authorlancea
Mon, 18 Apr 2011 12:07:29 -0400
changeset 9280 14b5e598a0fe
parent 9279 5f5d493d30a0
child 9281 41e796d1b6c1
child 9282 2b77c38d73fc
7037085: Add hashCode() to Timestamp to address Findbugs warning Reviewed-by: darcy, alanb, emcmanus
jdk/src/share/classes/java/sql/Timestamp.java
--- a/jdk/src/share/classes/java/sql/Timestamp.java	Mon Apr 18 16:10:40 2011 +0100
+++ b/jdk/src/share/classes/java/sql/Timestamp.java	Mon Apr 18 12:07:29 2011 -0400
@@ -54,7 +54,7 @@
  * As a result, the <code>Timestamp.equals(Object)</code>
  * method is not symmetric with respect to the
  * <code>java.util.Date.equals(Object)</code>
- * method.  Also, the <code>hashcode</code> method uses the underlying
+ * method.  Also, the <code>hashCode</code> method uses the underlying
  * <code>java.util.Date</code>
  * implementation and therefore does not include nanos in its computation.
  * <P>
@@ -515,6 +515,18 @@
       }
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * The {@code hashCode} method uses the underlying {@code java.util.Date}
+     * implementation and therefore does not include nanos in its computation.
+     *
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
+
     static final long serialVersionUID = 2745179027874758501L;
 
 }