Ignore:
Timestamp:
2017-04-10T00:14:42+02:00 (3 years ago)
Author:
Don-vip
Message:

findbugs - EI_EXPOSE_REP2 + javadoc

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java

    r8836 r11878  
    121121        this.source = source == null ? Source.UNSPECIFIED : source;
    122122        this.changesetId = changesetId;
    123         this.closedOn = closedOn;
     123        this.closedOn = DateUtils.cloneDate(closedOn);
    124124    }
    125125
     
    139139     */
    140140    public Date getClosedOn() {
    141         return closedOn;
     141        return DateUtils.cloneDate(closedOn);
    142142    }
    143143
  • trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java

    r11381 r11878  
    184184    public ChangesetQuery closedAfter(Date d) {
    185185        CheckParameterUtil.ensureParameterNotNull(d, "d");
    186         this.closedAfter = d;
     186        this.closedAfter = DateUtils.cloneDate(d);
    187187        return this;
    188188    }
     
    202202        CheckParameterUtil.ensureParameterNotNull(closedAfter, "closedAfter");
    203203        CheckParameterUtil.ensureParameterNotNull(createdBefore, "createdBefore");
    204         this.closedAfter = closedAfter;
    205         this.createdBefore = createdBefore;
     204        this.closedAfter = DateUtils.cloneDate(closedAfter);
     205        this.createdBefore = DateUtils.cloneDate(createdBefore);
    206206        return this;
    207207    }
  • trunk/src/org/openstreetmap/josm/io/OsmWriter.java

    r11709 r11878  
    88import java.util.Collection;
    99import java.util.Comparator;
     10import java.util.Date;
    1011import java.util.List;
    1112import java.util.Map.Entry;
     
    242243            out.print(" uid='"+cs.getUser().getId() +'\'');
    243244        }
    244         if (cs.getCreatedAt() != null) {
    245             out.print(" created_at='"+DateUtils.fromDate(cs.getCreatedAt()) +'\'');
    246         }
    247         if (cs.getClosedAt() != null) {
    248             out.print(" closed_at='"+DateUtils.fromDate(cs.getClosedAt()) +'\'');
     245        Date createdDate = cs.getCreatedAt();
     246        if (createdDate != null) {
     247            out.print(" created_at='"+DateUtils.fromDate(createdDate) +'\'');
     248        }
     249        Date closedDate = cs.getClosedAt();
     250        if (closedDate != null) {
     251            out.print(" closed_at='"+DateUtils.fromDate(closedDate) +'\'');
    249252        }
    250253        out.print(" open='"+ (cs.isOpen() ? "true" : "false") +'\'');
Note: See TracChangeset for help on using the changeset viewer.