Changeset 18868 in josm for trunk/src/org/openstreetmap/josm/data/osm
- Timestamp:
- 2023-10-12T22:32:39+02:00 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
r18208 r18868 7 7 import java.util.Collections; 8 8 import java.util.Comparator; 9 import java.util.HashSet; 9 10 import java.util.List; 10 11 import java.util.Map; 12 import java.util.Set; 11 13 12 14 import org.openstreetmap.josm.data.Data; … … 53 55 private final ListenerList<NoteDataUpdateListener> listeners = ListenerList.create(); 54 56 57 private final Set<DataSource> dataSourceSet = new HashSet<>(); 58 55 59 /** 56 60 * Construct a new note container without notes … … 140 144 if (this != from) { 141 145 addNotes(from.noteList); 146 from.getDataSources().forEach(this::addDataSource); 142 147 } 143 148 } … … 315 320 @Override 316 321 public Collection<DataSource> getDataSources() { 317 return Collections.emptyList(); // Notes don't currently store data sources 322 return Collections.unmodifiableSet(this.dataSourceSet); 323 } 324 325 /** 326 * Adds a new data source. 327 * @param source data source to add 328 * @return {@code true} if the collection changed as a result of the call 329 * @since 18868 330 */ 331 public synchronized boolean addDataSource(DataSource source) { 332 return this.dataSourceSet.add(source); 318 333 } 319 334 }
Note:
See TracChangeset
for help on using the changeset viewer.