Changeset 6315 in josm


Ignore:
Timestamp:
2013-10-07T20:04:50+02:00 (11 years ago)
Author:
simon04
Message:

fix #9068 - Don't warn about empty key and empty value in upload tags

File:
1 edited

Legend:

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

    r6309 r6315  
    457457            }
    458458
    459             /* test for empty tags in the changeset metadata and proceed only after user's confirmation */
     459            /* test for empty tags in the changeset metadata and proceed only after user's confirmation.
     460             * though, accept if key and value are empty (cf. xor). */
    460461            List<String> emptyChangesetTags = new ArrayList<String>();
    461462            for (final Entry<String, String> i : pnlTagSettings.getTags(true).entrySet()) {
    462                 if (i.getKey() == null || i.getKey().trim().isEmpty()
    463                         || i.getValue() == null || i.getValue().trim().isEmpty()) {
     463                if ((i.getKey() == null || i.getKey().trim().isEmpty())
     464                        ^ (i.getValue() == null || i.getValue().trim().isEmpty())) {
    464465                    emptyChangesetTags.add(tr("{0}={1}", i.getKey(), i.getValue()));
    465466                }
Note: See TracChangeset for help on using the changeset viewer.