arina-ielchiieva commented on a change in pull request #1988: DRILL-7590:
Refactor plugin registry
URL: https://github.com/apache/drill/pull/1988#discussion_r383952847
##########
File path:
common/src/main/java/org/apache/drill/common/collections/ImmutableEntry.java
##########
@@ -48,15 +48,24 @@ public V setValue(final V value) {
@Override
public boolean equals(final Object other) {
- if (other instanceof ImmutableEntry && other.getClass() == getClass()) {
- final ImmutableEntry<K, V> entry = (ImmutableEntry<K, V>)other;
- return Objects.equal(key, entry.key) && Objects.equal(value,
entry.value);
+ if (other == this) {
+ return true;
}
- return false;
+ if (other == null || !(other instanceof Map.Entry)) {
+ return false;
+ }
+ final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) other;
Review comment:
```suggestion
Map.Entry<?, ?> entry = (Map.Entry<?, ?>) other;
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services