Ignore:
Timestamp:
2016-03-15T09:15:57+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - do not copy collection contents from one to another with a loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

    r9078 r9999  
    1212
    1313import org.openstreetmap.josm.Main;
    14 import org.openstreetmap.josm.data.DataSource;
    1514import org.openstreetmap.josm.data.osm.DataSet;
    1615import org.openstreetmap.josm.data.osm.DataSetMerger;
     
    165164
    166165                // copy the merged layer's data source info
    167                 for (DataSource src : referrers.dataSources) {
    168                     getLayer().data.dataSources.add(src);
    169                 }
     166                getLayer().data.dataSources.addAll(referrers.dataSources);
    170167                // FIXME: this is necessary because there are  dialogs listening
    171                 // for DataChangeEvents which manipulate Swing components on this
    172                 // thread.
     168                // for DataChangeEvents which manipulate Swing components on this thread.
    173169                //
    174170                SwingUtilities.invokeLater(
Note: See TracChangeset for help on using the changeset viewer.