Changeset 1630 in josm for trunk/src/org


Ignore:
Timestamp:
2009-06-01T00:07:28+02:00 (15 years ago)
Author:
stoecker
Message:

close #2677 - NPE on upload

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r1628 r1630  
    105105                p.add(new JLabel(tr("Provide a brief comment for the changes you are uploading:")), GBC.eol().insets(0, 5, 10, 3));
    106106                SuggestingJHistoryComboBox cmt = new SuggestingJHistoryComboBox();
    107                 List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, null));
     107                List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(HISTORY_KEY, new LinkedList<String>()));
    108108                cmt.setHistory(cmtHistory);
    109109                //final JTextField cmt = new JTextField(lastCommitComment);
  • trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java

    r1628 r1630  
    100100                // add the last entered comment to the changeset
    101101                String cmt = "";
    102                 List<String> history = new LinkedList<String>(Main.pref.getCollection(UploadAction.HISTORY_KEY, null));
     102                List<String> history = new LinkedList<String>(
     103                Main.pref.getCollection(UploadAction.HISTORY_KEY, new LinkedList<String>()));
    103104                if(history.size() > 0) {
    104105                    cmt = history.get(0);
Note: See TracChangeset for help on using the changeset viewer.