Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/2941#discussion_r249026503
--- Diff:
external/storm-kafka-monitor/src/main/java/org/apache/storm/kafka/monitor/NewKafkaSpoutOffsetQuery.java
---
@@ -64,27 +64,51 @@ public String toString() {
"topics='" + topics + '\'' +
", consumerGroupId='" + consumerGroupId + '\'' +
", bootStrapBrokers='" + bootStrapBrokers + '\'' +
+ ", securityProtocol='" + securityProtocol + '\'' +
+ ", consumerPropertiesFileName='" +
consumerPropertiesFileName + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
NewKafkaSpoutOffsetQuery that = (NewKafkaSpoutOffsetQuery) o;
- if (topics != null ? !topics.equals(that.topics) : that.topics !=
null) return false;
- if (consumerGroupId != null ?
!consumerGroupId.equals(that.consumerGroupId) : that.consumerGroupId != null)
return false;
- return !(bootStrapBrokers != null ?
!bootStrapBrokers.equals(that.bootStrapBrokers) : that.bootStrapBrokers !=
null);
-
+ if (topics != null ? !topics.equals(that.topics) : that.topics !=
null) {
+ return false;
+ }
+ if (consumerGroupId != null ?
!consumerGroupId.equals(that.consumerGroupId)
+ : that.consumerGroupId != null) {
+ return false;
+ }
+ if (bootStrapBrokers != null ?
!bootStrapBrokers.equals(that.bootStrapBrokers)
+ : that.bootStrapBrokers != null) {
+ return false;
+ }
+ if (securityProtocol != null ?
!securityProtocol.equals(that.securityProtocol)
+ : that.securityProtocol != null) {
+ return false;
+ }
+ return consumerPropertiesFileName != null ?
consumerPropertiesFileName
+ .equals(that.consumerPropertiesFileName) :
that.consumerPropertiesFileName == null;
}
@Override
public int hashCode() {
int result = topics != null ? topics.hashCode() : 0;
result = 31 * result + (consumerGroupId != null ?
consumerGroupId.hashCode() : 0);
result = 31 * result + (bootStrapBrokers != null ?
bootStrapBrokers.hashCode() : 0);
+ result = 31 * result + (securityProtocol != null ?
securityProtocol.hashCode() : 0);
+ result =
+ 31 * result + (consumerPropertiesFileName != null ?
consumerPropertiesFileName
+ .hashCode()
+ : 0);
--- End diff --
The formatting here is off.
---