Changeset 8981 in josm for trunk/src/org


Ignore:
Timestamp:
2015-11-02T21:27:17+01:00 (4 years ago)
Author:
simon04
Message:

fix #12038 - ConcurrentModificationException using purge command

Regression from r8905.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/PurgeAction.java

    r8905 r8981  
    181181             */
    182182            List<Relation> relLst = new ArrayList<>(relSet);
    183             for (Relation r : relLst) {
    184                 for (OsmPrimitive parent : r.getReferrers()) {
     183            for (int i = 0; i < relLst.size(); ++i) { // foreach loop not applicable since list gets extended while looping over it
     184                for (OsmPrimitive parent : relLst.get(i).getReferrers()) {
    185185                    if (!(toPurgeChecked.contains(parent))
    186186                            && hasOnlyIncompleteMembers((Relation) parent, toPurgeChecked, relLst)) {
Note: See TracChangeset for help on using the changeset viewer.