Github user denalex commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1379#discussion_r202126336
  
    --- 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 --
    
    yes, agree, my previous comment about EqualsBuilder was about the pattern 
of comparisons for the top of the method and the helper in case there are 
multiple fields. Here with only one member, direct comparison should suffice.


---

Reply via email to