Ticket #20395: 20395.patch
| File 20395.patch, 2.6 KB (added by , 5 years ago) |
|---|
-
src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.util.ArrayList;7 6 import java.util.Collection; 8 7 import java.util.Iterator; 9 8 import java.util.List; … … 38 37 * </ul> 39 38 */ 40 39 public class ConflictCollection implements Iterable<Conflict<? extends OsmPrimitive>> { 41 private final List<Conflict<? extends OsmPrimitive>> conflicts;40 private final CopyOnWriteArrayList<Conflict<? extends OsmPrimitive>> conflicts; 42 41 private final CopyOnWriteArrayList<IConflictListener> listeners; 43 42 44 43 /** … … 45 44 * Constructs a new {@code ConflictCollection}. 46 45 */ 47 46 public ConflictCollection() { 48 conflicts = new ArrayList<>();47 conflicts = new CopyOnWriteArrayList<>(); 49 48 listeners = new CopyOnWriteArrayList<>(); 50 49 } 51 50 … … 326 325 } 327 326 328 327 /** 329 * Returns the list of conflicts involving nodes.330 * @return The list of conflicts involving nodes.328 * Returns the list of conflicts involving ways. 329 * @return The list of conflicts involving ways. 331 330 * @since 6555 332 331 */ 333 332 public final Collection<Conflict<? extends OsmPrimitive>> getWayConflicts() { … … 335 334 } 336 335 337 336 /** 338 * Returns the list of conflicts involving nodes.339 * @return The list of conflicts involving nodes.337 * Returns the list of conflicts involving relations. 338 * @return The list of conflicts involving relations. 340 339 * @since 6555 341 340 */ 342 341 public final Collection<Conflict<? extends OsmPrimitive>> getRelationConflicts() { -
src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
223 223 */ 224 224 public void refreshView() { 225 225 DataSet editDs = MainApplication.getLayerManager().getEditDataSet(); 226 synchronized (this) { 227 conflicts = editDs == null ? new ConflictCollection() : editDs.getConflicts(); 228 } 226 conflicts = editDs == null ? new ConflictCollection() : editDs.getConflicts(); 229 227 GuiHelper.runInEDT(() -> { 230 228 model.fireContentChanged(); 231 229 updateTitle();
