提交 d2f14480 authored 作者: Noel Grandin's avatar Noel Grandin

use hashCode in ValueLobDb.equals

to short circuit where possible
上级 10ed1eb9
......@@ -482,7 +482,12 @@ public class ValueLobDb extends Value implements Value.ValueClob,
@Override
public boolean equals(Object other) {
return other instanceof ValueLobDb && compareSecure((Value) other, null) == 0;
if (!(other instanceof ValueLobDb))
return false;
ValueLobDb otherLob = (ValueLobDb) other;
if (hashCode() != otherLob.hashCode())
return false;
return compareSecure((Value) other, null) == 0;
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论