Changeset 2472 in josm for trunk


Ignore:
Timestamp:
2009-11-18T18:56:46+01:00 (15 years ago)
Author:
Gubaer
Message:

Make sure getErrors() never returns null, see #3972

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r2460 r2472  
    886886    }
    887887
     888    /**
     889     * Replies the list of errors registered for this primitive.
     890     *
     891     * @param primitive the primitive for which errors are queried
     892     * @return the list of errors. Never null.
     893     * @deprecated should be moved to the validator plugin
     894     */
     895    @Deprecated
    888896    public List<String> getErrors(OsmPrimitive primitive) {
    889         return errors.get(primitive);
     897        List<String> ret = errors.get(primitive);
     898        if (ret == null) {
     899            ret = Collections.emptyList();
     900        }
     901        return ret;
    890902    }
    891903
Note: See TracChangeset for help on using the changeset viewer.