Ignore:
Timestamp:
2016-04-10T16:57:50+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar, javadoc

File:
1 edited

Legend:

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

    r9213 r10134  
    4646                return -1;
    4747            }
    48             if (n1.getState() == State.closed && n2.getState() == State.open) {
     48            if (n1.getState() == State.CLOSED && n2.getState() == State.OPEN) {
    4949                return 1;
    5050            }
    51             if (n1.getState() == State.open && n2.getState() == State.closed) {
     51            if (n1.getState() == State.OPEN && n2.getState() == State.CLOSED) {
    5252                return -1;
    5353            }
     
    200200        Note note = new Note(location);
    201201        note.setCreatedAt(new Date());
    202         note.setState(State.open);
     202        note.setState(State.OPEN);
    203203        note.setId(newNoteId--);
    204         NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.opened, true);
     204        NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.OPENED, true);
    205205        note.addComment(comment);
    206206        if (Main.isDebugEnabled()) {
     
    220220            throw new IllegalArgumentException("Note to modify must be in layer");
    221221        }
    222         if (note.getState() == State.closed) {
     222        if (note.getState() == State.CLOSED) {
    223223            throw new IllegalStateException("Cannot add a comment to a closed note");
    224224        }
     
    226226            Main.debug("Adding comment to note {0}: {1}", note.getId(), text);
    227227        }
    228         NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.commented, true);
     228        NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.COMMENTED, true);
    229229        note.addComment(comment);
    230230        dataUpdated();
     
    240240            throw new IllegalArgumentException("Note to close must be in layer");
    241241        }
    242         if (note.getState() != State.open) {
     242        if (note.getState() != State.OPEN) {
    243243            throw new IllegalStateException("Cannot close a note that isn't open");
    244244        }
     
    246246            Main.debug("closing note {0} with comment: {1}", note.getId(), text);
    247247        }
    248         NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.closed, true);
     248        NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.CLOSED, true);
    249249        note.addComment(comment);
    250         note.setState(State.closed);
     250        note.setState(State.CLOSED);
    251251        note.setClosedAt(new Date());
    252252        dataUpdated();
     
    262262            throw new IllegalArgumentException("Note to reopen must be in layer");
    263263        }
    264         if (note.getState() != State.closed) {
     264        if (note.getState() != State.CLOSED) {
    265265            throw new IllegalStateException("Cannot reopen a note that isn't closed");
    266266        }
     
    268268            Main.debug("reopening note {0} with comment: {1}", note.getId(), text);
    269269        }
    270         NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.reopened, true);
     270        NoteComment comment = new NoteComment(new Date(), getCurrentUser(), text, NoteComment.Action.REOPENED, true);
    271271        note.addComment(comment);
    272         note.setState(State.open);
     272        note.setState(State.OPEN);
    273273        dataUpdated();
    274274    }
Note: See TracChangeset for help on using the changeset viewer.