Changeset 11316 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2016-11-26T12:47:04+01:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - SA_FIELD_DOUBLE_ASSIGNMENT - proper fix

File:
1 edited

Legend:

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

    r11314 r11316  
    451451        addToBBox(box, new HashSet<PrimitiveId>());
    452452        if (getDataSet() != null)
    453             bbox = box; // set cache
     453            setBBox(box); // set cache
    454454        return new BBox(box);
     455    }
     456
     457    private void setBBox(BBox bbox) {
     458        this.bbox = bbox;
    455459    }
    456460
     
    465469    @Override
    466470    public void updatePosition() {
    467         bbox = getBBox();
     471        setBBox(null); // make sure that it is recalculated
     472        setBBox(getBBox());
    468473    }
    469474
     
    472477        super.setDataset(dataSet);
    473478        checkMembers();
    474         bbox = null; // bbox might have changed if relation was in ds, was removed, modified, added back to dataset
     479        setBBox(null); // bbox might have changed if relation was in ds, was removed, modified, added back to dataset
    475480    }
    476481
Note: See TracChangeset for help on using the changeset viewer.