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


Ignore:
Timestamp:
2016-04-02T16:25:53+02:00 (8 years ago)
Author:
Don-vip
Message:

add more unit tests

Location:
trunk/src/org/openstreetmap/josm/data/notes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/notes/Note.java

    r9858 r10098  
    8181
    8282    public void addComment(NoteComment comment) {
    83         this.comments.add(comment);
     83        comments.add(comment);
    8484    }
    8585
     
    8989     */
    9090    public NoteComment getFirstComment() {
    91         return this.comments.get(0);
     91        return comments.isEmpty() ? null : comments.get(0);
    9292    }
    9393
  • trunk/src/org/openstreetmap/josm/data/notes/NoteComment.java

    r9858 r10098  
    6767    }
    6868
     69    /**
     70     * Sets whether this is a new comment/action and needs to be uploaded to the API
     71     * @param isNew {@code true} if this is a new comment/action and needs to be uploaded to the API
     72     */
    6973    public void setNew(boolean isNew) {
    7074        this.isNew = isNew;
Note: See TracChangeset for help on using the changeset viewer.