changeset 4022:9b3e6baad033

7037085: Add hashCode() to Timestamp to address Findbugs warning Reviewed-by: darcy, alanb, emcmanus
author lancea
date Mon, 18 Apr 2011 12:07:29 -0400
parents 005c0c85b0de
children 98688c4be64b 60a457a944c4
files src/share/classes/java/sql/Timestamp.java
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/sql/Timestamp.java	Mon Apr 18 16:10:40 2011 +0100
+++ b/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;
 
 }