Skip to content

Commit

Permalink
Fix failing TestPolicyStateRecording
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 9, 2019
1 parent b0cbf6a commit fb2a624
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -546,18 +546,20 @@ private static JAXBElement<String> copyOfStringElement(final JAXBElement<String>
return null;
}

// !!! Do NOT autogenerate this method without preserving custom changes !!!
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((any == null) ? 0 : any.hashCode());
result = prime * result + ((any == null || any.isEmpty()) ? 0 : any.hashCode());
result = prime * result + ((lang == null) ? 0 : lang.hashCode());
result = prime * result + ((norm == null) ? 0 : norm.hashCode());
result = prime * result + ((orig == null) ? 0 : orig.hashCode());
result = prime * result + ((translation == null) ? 0 : translation.hashCode());
return result;
}

// !!! Do NOT autogenerate this method without preserving custom changes !!!
@Override
public boolean equals(Object obj) {
if (this == obj) {
Expand All @@ -570,8 +572,8 @@ public boolean equals(Object obj) {
return false;
}
PolyStringType other = (PolyStringType) obj;
if (any == null) {
if (other.any != null) {
if (any == null || any.isEmpty()) { // because any is instantiated on get (so null and empty should be considered equivalent)
if (other.any != null && !other.any.isEmpty()) {
return false;
}
} else if (!any.equals(other.any)) {
Expand Down

0 comments on commit fb2a624

Please sign in to comment.