Ignore:
Timestamp:
2014-02-27T02:50:12+01:00 (10 years ago)
Author:
Don-vip
Message:

fix some Sonar issues (Constructor Calls Overridable Method)

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
9 edited

Legend:

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

    r6204 r6890  
    107107    }
    108108
    109     public void add(LatLon c) {
     109    public final void add(LatLon c) {
    110110        add(c.lon(), c.lat());
    111111    }
     
    114114     * Extends this bbox to include the point (x, y)
    115115     */
    116     public void add(double x, double y) {
     116    public final void add(double x, double y) {
    117117        xmin = Math.min(xmin, x);
    118118        xmax = Math.max(xmax, x);
     
    122122    }
    123123
    124     public void add(BBox box) {
     124    public final void add(BBox box) {
    125125        xmin = Math.min(xmin, box.xmin);
    126126        xmax = Math.max(xmax, box.xmax);
  • trunk/src/org/openstreetmap/josm/data/osm/NodeData.java

    r6009 r6890  
    3232
    3333    @Override
    34     public void setCoor(LatLon coor) {
     34    public final void setCoor(LatLon coor) {
    3535        if (coor == null) {
    3636            this.lat = Double.NaN;
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r6889 r6890  
    570570
    571571    @Override
    572     protected void setIncomplete(boolean incomplete) {
     572    protected final void setIncomplete(boolean incomplete) {
    573573        boolean locked = writeLock();
    574574        try {
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java

    r6084 r6890  
    7676            }
    7777
    78             public void visitAll() {
     78            public final void visitAll() {
    7979                for (OsmPrimitive osm : primitives) {
    8080                    firstIteration = true;
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r6296 r6890  
    356356         * corner of the box
    357357         */
    358         LatLon coor() {
     358        final LatLon coor() {
    359359            return QuadTiling.tile2LatLon(this.quad);
    360360        }
     
    404404
    405405    @Override
    406     public void clear() {
     406    public final void clear() {
    407407        root = new QBLevel<T>(this);
    408408        search_cache = null;
     
    500500        int iterated_over;
    501501
    502         QBLevel<T> next_content_node(QBLevel<T> q) {
     502        final QBLevel<T> next_content_node(QBLevel<T> q) {
    503503            if (q == null)
    504504                return null;
  • trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java

    r6823 r6890  
    193193     * @param tag the tag to add
    194194     */
    195     public void add(Tag tag){
     195    public final void add(Tag tag){
    196196        if (tag == null) return;
    197197        if (tags.contains(tag)) return;
     
    205205     * @param tags the collection of tags
    206206     */
    207     public void add(Collection<Tag> tags) {
     207    public final void add(Collection<Tag> tags) {
    208208        if (tags == null) return;
    209209        for (Tag tag: tags){
     
    218218     * @param tags the other tag collection
    219219     */
    220     public void add(TagCollection tags) {
     220    public final void add(TagCollection tags) {
    221221        if (tags == null) return;
    222222        this.tags.addAll(tags.tags);
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java

    r6830 r6890  
    7373     * @return the coordinates. May be null.
    7474     */
    75     public LatLon getCoords() {
     75    public final LatLon getCoords() {
    7676        return coords;
    7777    }
     
    8181     * @param coords the coordinates. Can be null.
    8282     */
    83     public void setCoords(LatLon coords) {
     83    public final void setCoords(LatLon coords) {
    8484        this.coords = coords;
    8585    }
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java

    r6830 r6890  
    3838    private Map<String, String> tags;
    3939
    40     protected void ensurePositiveLong(long value, String name) {
     40    protected final void ensurePositiveLong(long value, String name) {
    4141        if (value <= 0) {
    4242            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got ''{1}''.", name, value));
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java

    r6883 r6890  
    359359    }
    360360
    361     private void load(Relation r) {
     361    private final void load(Relation r) {
    362362        MultipolygonRoleMatcher matcher = getMultipolygonRoleMatcher();
    363363
     
    537537    }
    538538
    539     private void addInnerToOuters()  {
     539    private final void addInnerToOuters()  {
    540540
    541541        if (innerPolygons.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.