Changeset 13637 in josm for trunk/src/org


Ignore:
Timestamp:
2018-04-15T19:14:17+02:00 (7 years ago)
Author:
Don-vip
Message:

minor fixes

Location:
trunk/src/org/openstreetmap/josm/data
Files:
4 edited

Legend:

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

    r13625 r13637  
    2121
    2222/**
    23 * Abstract class to represent common features of the datatypes primitives.
    24 *
    25 * @since 4099
    26 */
     23 * Abstract class to represent common features of the datatypes primitives.
     24 *
     25 * @since 4099
     26 */
    2727public abstract class AbstractPrimitive implements IPrimitive {
    2828
  • trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java

    r13611 r13637  
    147147     * @return the value of "layer" key, or null if absent or set to 0 (default value)
    148148     * @since 12986
     149     * @since 13637 (signature)
    149150     */
    150     public static String getLayer(OsmPrimitive w) {
     151    public static String getLayer(IPrimitive w) {
    151152        String layer1 = w.get("layer");
    152153        if ("0".equals(layer1)) {
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java

    r11783 r13637  
    280280
    281281        // Fix relations.
    282         if (relationWithRelations != null && relationToKeep != relationWithRelations) {
     282        if (relationWithRelations != null && relRef != null && relationToKeep != relationWithRelations) {
    283283            for (Relation rel : relRef) {
    284284                Relation newRel = new Relation(rel);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java

    r13493 r13637  
    339339    @Override
    340340    public Command fixError(TestError testError) {
    341         if (isFixable(testError) && !testError.getPrimitives().iterator().next().isDeleted()) {
    342             return new DeleteCommand(testError.getPrimitives());
     341        Collection<? extends OsmPrimitive> primitives = testError.getPrimitives();
     342        if (isFixable(testError) && !primitives.iterator().next().isDeleted()) {
     343            return new DeleteCommand(primitives);
    343344        }
    344345        return null;
Note: See TracChangeset for help on using the changeset viewer.