hawq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lavjain <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request #1379: HAWQ-1622. Cache PXF proxy UGI so that cl...
Date Thu, 12 Jul 2018 17:00:05 GMT
Github user lavjain commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1379#discussion_r202108154
  
    --- Diff: pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/SessionId.java ---
    @@ -65,12 +74,15 @@ public int hashCode() {
          * {@inheritDoc}
          */
         @Override
    -    public boolean equals(Object other) {
    -        if (!(other instanceof SessionId)) {
    -            return false;
    -        }
    -        SessionId that = (SessionId) other;
    -        return this.sessionId.equals(that.sessionId);
    +    public boolean equals(Object obj) {
    +        if (obj == null) return false;
    +        if (obj == this) return true;
    +        if (obj.getClass() != getClass()) return false;
    +
    +        SessionId that = (SessionId) obj;
    +        return new EqualsBuilder()
    +                .append(sessionId, that.sessionId)
    +                .isEquals();
    --- End diff --
    
    EqualsBuilder is not needed for comparing strings


---

Mime
View raw message