Changeset 3025 in josm for trunk/src


Ignore:
Timestamp:
2010-02-19T21:43:42+01:00 (10 years ago)
Author:
jttt
Message:

Fix tests

Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
5 edited

Legend:

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

    r2578 r3025  
    8787        progressMonitor.beginTask(tr("Updating data"));
    8888        try {
    89             List<Rectangle2D> rects = new LinkedList<Rectangle2D>();
     89            List<Rectangle2D> rects = new ArrayList<Rectangle2D>(areas.size());
    9090            for (Area a : areas) {
    9191                rects.add(a.getBounds2D());
  • trunk/src/org/openstreetmap/josm/data/osm/DatasetConsistencyTest.java

    r2958 r3025  
    124124    public void checkZeroNodesWays() {
    125125        for (Way way:dataSet.getWays()) {
    126             if (way.isUsable() && way.getNodesCount() == 0) {
     126            if (way.isUsable() && way.isVisible() && way.getNodesCount() == 0) {
    127127                printError("WARN - ZERO NODES", "Way %s has zero nodes", way);
    128128            } else if (way.isUsable() && way.getNodesCount() == 1) {
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r3004 r3025  
    873873     */
    874874    public boolean hasSameTags(OsmPrimitive other) {
    875         return keySet().equals(other.keySet());
     875        return getKeys().equals(other.getKeys());
    876876    }
    877877
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r2982 r3025  
    1717public final class Relation extends OsmPrimitive {
    1818
    19     /**
    20      * All members of this relation. Note that after changing this,
    21      * makeBackReferences and/or removeBackReferences should be called.
    22      *
    23      */
    2419    private final List<RelationMember> members = new ArrayList<RelationMember>();
    2520
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java

    r2983 r3025  
    7979    protected EntriesSelectionModel mergedEntriesSelectionModel;
    8080
    81     private final ArrayList<PropertyChangeListener> listeners;
     81    private final List<PropertyChangeListener> listeners;
    8282    private boolean isFrozen = false;
    8383    private final ComparePairListModel comparePairListModel;
     
    340340
    341341    private void copy(ListRole sourceRole, int[] rows, int position) {
     342        if (position < 0 || position > getMergedEntriesSize())
     343            throw new IllegalArgumentException();
    342344        List<T> newItems = new ArrayList<T>(rows.length);
    343345        List<T> source = entries.get(sourceRole);
Note: See TracChangeset for help on using the changeset viewer.