Ignore:
Timestamp:
2016-04-10T18:13:08+02:00 (8 years ago)
Author:
Don-vip
Message:

fix note parsing broken by r10134

File:
1 edited

Legend:

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

    r10134 r10136  
    99import java.util.Date;
    1010import java.util.List;
     11import java.util.Locale;
    1112
    1213import javax.xml.parsers.ParserConfigurationException;
     
    116117                }
    117118                commentUsername = attrs.getValue("user");
    118                 noteAction = Action.valueOf(attrs.getValue("action"));
     119                noteAction = Action.valueOf(attrs.getValue("action").toUpperCase(Locale.ENGLISH));
    119120                commentCreateDate = DateUtils.fromString(attrs.getValue("timestamp"));
    120121                String isNew = attrs.getValue("is_new");
     
    161162                break;
    162163            case "status":
    163                 thisNote.setState(Note.State.valueOf(buffer.toString()));
     164                thisNote.setState(Note.State.valueOf(buffer.toString().toUpperCase(Locale.ENGLISH)));
    164165                break;
    165166            case "date_created":
     
    183184                break;
    184185            case "action":
    185                 noteAction = Action.valueOf(buffer.toString());
     186                noteAction = Action.valueOf(buffer.toString().toUpperCase(Locale.ENGLISH));
    186187                break;
    187188            case "note": //nothing to do for comment or note, already handled above
Note: See TracChangeset for help on using the changeset viewer.