提交 5b14ac99 编写于 作者: L lancea

7037085: Add hashCode() to Timestamp to address Findbugs warning

Reviewed-by: darcy, alanb, emcmanus
上级 71aac3bf
......@@ -54,7 +54,7 @@ import java.util.StringTokenizer;
* 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 @@ public class Timestamp extends java.util.Date {
}
}
/**
* {@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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册