Changeset 13100 in josm for trunk/src/org
- Timestamp:
- 2017-11-08T22:58:48+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/User.java
r12865 r13100 159 159 * 160 160 * @param name User name 161 * @throws NullPointerException if name is null 161 162 */ 162 163 public void addName(String name) { 163 names.add( name);164 names.add(Objects.requireNonNull(name, "name")); 164 165 } 165 166 … … 170 171 * data files it is unclear which is the up-to-date user name. 171 172 * @param name the preferred user name to set 173 * @throws NullPointerException if name is null 172 174 */ 173 175 public void setPreferredName(String name) { … … 177 179 final Collection<String> allNames = new LinkedHashSet<>(names); 178 180 names.clear(); 179 names.add( name);181 names.add(Objects.requireNonNull(name, "name")); 180 182 names.addAll(allNames); 181 183 }
Note:
See TracChangeset
for help on using the changeset viewer.