Skip to content

Commit

Permalink
Drawings: fix a ConcurrentModificationException
Browse files Browse the repository at this point in the history
This could occur when cleaing the drawings in the DrawingListPanel.
  • Loading branch information
Gama11 committed Jul 29, 2016
1 parent dad3331 commit 4c8b2f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rv/comm/drawing/Drawings.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public class Drawings {
/** Event object launched when the list of sets is modified */
public class SetListChangeEvent extends EventObject {

private final ArrayList<BufferedSet<Shape>> shapeSets;
private final CopyOnWriteArrayList<BufferedSet<Shape>> shapeSets;
private final CopyOnWriteArrayList<BufferedSet<Annotation>> annotationSets;

public ArrayList<BufferedSet<Shape>> getShapeSets() {
public CopyOnWriteArrayList<BufferedSet<Shape>> getShapeSets() {
return shapeSets;
}

Expand All @@ -65,7 +65,7 @@ public interface ShapeListListener extends EventListener {
private final ArrayList<ShapeListListener> listeners = new ArrayList<>();
private final HashMap<String, BufferedSet<Shape>> shapeSetListing = new HashMap<>();
private final HashMap<String, BufferedSet<Annotation>> annotationSetListing = new HashMap<>();
private final ArrayList<BufferedSet<Shape>> shapeSets = new ArrayList<>();
private final CopyOnWriteArrayList<BufferedSet<Shape>> shapeSets = new CopyOnWriteArrayList<>();
private final CopyOnWriteArrayList<BufferedSet<Annotation>> annotationSets = new CopyOnWriteArrayList<>();
private boolean changed = false;
private boolean visible = true;
Expand Down

0 comments on commit 4c8b2f4

Please sign in to comment.