Index: /trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 17994)
+++ /trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 17995)
@@ -411,5 +411,5 @@
             if (!(e.getSource() instanceof ChangesetCommentModel)) return;
             String newComment = ((ChangesetCommentModel) e.getSource()).getComment();
-            if (!destination.getText().equals(newComment)) {
+            if (!destination.getText().trim().equals(newComment)) {
                 destination.setText(newComment);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 17994)
+++ /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 17995)
@@ -25,5 +25,5 @@
     public void setComment(String comment) {
         String oldValue = this.comment;
-        this.comment = comment == null ? "" : comment;
+        this.comment = comment == null ? "" : comment.trim();
         if (!Objects.equals(oldValue, this.comment)) {
             fireStateChanged();
