Ignore:
Timestamp:
2015-06-03T04:36:57+02:00 (9 years ago)
Author:
Don-vip
Message:

see #11508 - override hashCode() and equals() in other commands as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java

    r8444 r8456  
    8686        return ImageProvider.get(conflict.getMy().getDisplayType());
    8787    }
     88
     89    @Override
     90    public int hashCode() {
     91        final int prime = 31;
     92        int result = super.hashCode();
     93        result = prime * result + ((conflict == null) ? 0 : conflict.hashCode());
     94        return result;
     95    }
     96
     97    @Override
     98    public boolean equals(Object obj) {
     99        if (this == obj)
     100            return true;
     101        if (!super.equals(obj))
     102            return false;
     103        if (getClass() != obj.getClass())
     104            return false;
     105        ConflictAddCommand other = (ConflictAddCommand) obj;
     106        if (conflict == null) {
     107            if (other.conflict != null)
     108                return false;
     109        } else if (!conflict.equals(other.conflict))
     110            return false;
     111        return true;
     112    }
    88113}
Note: See TracChangeset for help on using the changeset viewer.