Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/data/Preferences.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r9312 r9371 228 228 @Override 229 229 public int hashCode() { 230 final int prime = 31; 231 int result = 1; 232 result = prime * result + ((value == null) ? 0 : value.hashCode()); 233 return result; 230 return Objects.hash(value); 234 231 } 235 232 236 233 @Override 237 234 public boolean equals(Object obj) { 238 if (this == obj) 239 return true; 240 if (obj == null) 241 return false; 242 if (!(obj instanceof AbstractSetting)) 243 return false; 244 AbstractSetting<?> other = (AbstractSetting<?>) obj; 245 if (value == null) { 246 if (other.value != null) 247 return false; 248 } else if (!value.equals(other.value)) 249 return false; 250 return true; 235 if (this == obj) return true; 236 if (obj == null || getClass() != obj.getClass()) return false; 237 AbstractSetting<?> that = (AbstractSetting<?>) obj; 238 return Objects.equals(value, that.value); 251 239 } 252 240 }
Note:
See TracChangeset
for help on using the changeset viewer.