Github user ejwhite922 commented on a diff in the pull request:
https://github.com/apache/incubator-rya/pull/245#discussion_r145730329
--- Diff:
common/rya.api/src/main/java/org/apache/rya/api/domain/RyaType.java ---
@@ -93,10 +93,7 @@ public boolean equals(final Object o) {
if (data != null ? !data.equals(ryaType.data) : ryaType.data !=
null) {
return false;
}
- if (dataType != null ? !dataType.equals(ryaType.dataType) :
ryaType.dataType != null) {
- return false;
- }
- return true;
+ return dataType != null ? dataType.equals(ryaType.dataType) :
ryaType.dataType == null;
--- End diff --
While in here, I'd just have the equals() method use an EqualsBuilder so
all the inline-if's that were here before can be removed:
```
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (o == null || !(o instanceof RyaType)) {
return false;
}
final RyaType other = (RyaType) o;
final EqualsBuilder builder = new EqualsBuilder()
.append(getData(), other.getData())
.append(getDataType(), other.getDataType());
return builder.isEquals();
}
```
---