Skip to content

Commit

Permalink
Fix ElementProperty, MapKeyValueElementProperty equals and hashCode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
seongahjo authored Dec 6, 2024
1 parent 0dc61e9 commit 2221575
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ public boolean equals(Object obj) {
}
ElementProperty that = (ElementProperty)obj;
return containerProperty.equals(that.containerProperty)
&& elementType.equals(that.elementType)
&& elementType.getType().equals(that.elementType.getType())
&& annotations.equals(that.annotations);
}

@Override
public int hashCode() {
return Objects.hash(containerProperty, elementType, annotations);
return Objects.hash(containerProperty, elementType.getType(), annotations);
}

private boolean isOptional(Class<?> type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ public boolean equals(Object obj) {
}
MapKeyElementProperty that = (MapKeyElementProperty)obj;
return mapProperty.equals(that.mapProperty)
&& keyType.equals(that.keyType)
&& keyType.getType().equals(that.keyType.getType())
&& annotations.equals(that.annotations);
}

@Override
public int hashCode() {
return Objects.hash(mapProperty, keyType, annotations);
return Objects.hash(mapProperty, keyType.getType(), annotations);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ public boolean equals(Object obj) {
}
MapValueElementProperty that = (MapValueElementProperty)obj;
return mapProperty.equals(that.mapProperty)
&& valueType.equals(that.valueType)
&& valueType.getType().equals(that.valueType.getType())
&& annotations.equals(that.annotations);
}

@Override
public int hashCode() {
return Objects.hash(mapProperty, valueType, annotations);
return Objects.hash(mapProperty, valueType.getType(), annotations);
}
}

0 comments on commit 2221575

Please sign in to comment.