7037085: Add hashCode() to Timestamp to address Findbugs warning
Reviewed-by: darcy, alanb, emcmanus
--- 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;
}