mirror of
https://github.com/apache/openjpa.git
synced 2025-03-06 16:39:11 +00:00
OPENJPA-1316 Incorrect hashcode()/equals() implementation(s) in GeneratorImpl. Patch contributed by Heath Thomann.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1027992 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dcf503dd5a
commit
3b65de0765
@ -73,14 +73,17 @@ public class GeneratorImpl
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return _seq.hashCode();
|
||||
return ((_seq == null) ? 0 : _seq.hashCode());
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (other == this)
|
||||
return true;
|
||||
if (!(other instanceof GeneratorImpl))
|
||||
if ((other == null) || (other.getClass() != this.getClass()))
|
||||
return false;
|
||||
if (_seq == null)
|
||||
return false;
|
||||
|
||||
return _seq.equals(((GeneratorImpl) other)._seq);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user