jihoonson commented on a change in pull request #7933: #7858 Throwing
UnsupportedOperationException from ImmutableDruidDataSource's equals() and
hashCode() methods
URL: https://github.com/apache/incubator-druid/pull/7933#discussion_r297336196
##########
File path:
server/src/main/java/org/apache/druid/client/ImmutableDruidDataSource.java
##########
@@ -120,8 +120,32 @@ public String toString()
+ "'}";
}
+ /**
+ *
+ * Look at https://github.com/apache/incubator-druid/issues/7858 for
explanation of why equals method is not supported.
+ *
+ */
@Override
public boolean equals(Object o)
+ {
+ throw new UnsupportedOperationException("equals:ImmutableDruidDataSource
shouldn't be used as the key in containers");
Review comment:
It looks like `equals:ImmutableDruidDataSource` is not the Java convention.
At least I'm not familiar with it. Would you tell me where this convention came
from?
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]