Ignore:
Timestamp:
2016-01-09T23:20:37+01:00 (9 years ago)
Author:
simon04
Message:

Java 7: use Objects.equals and Objects.hash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleElementList.java

    r9284 r9371  
    5757    @Override
    5858    public boolean equals(Object obj) {
    59         if (obj == null || getClass() != obj.getClass()) {
    60             return false;
    61         }
    62         final StyleElementList other = (StyleElementList) obj;
    63         return Objects.equals(lst, other.lst);
     59        if (this == obj) return true;
     60        if (obj == null || getClass() != obj.getClass()) return false;
     61        StyleElementList that = (StyleElementList) obj;
     62        return Objects.equals(lst, that.lst);
    6463    }
    6564
    6665    @Override
    6766    public int hashCode() {
    68         return lst.hashCode();
     67        return Objects.hash(lst);
    6968    }
    70 
    7169}
Note: See TracChangeset for help on using the changeset viewer.