Ignore:
Timestamp:
2014-12-10T22:07:39+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #10816 - add various safeguards to make sure to not upload empty keys

File:
1 edited

Legend:

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

    r7005 r7783  
    8080                String v = Tag.removeWhiteSpaces(e.getValue());
    8181                String k = Tag.removeWhiteSpaces(e.getKey());
     82                boolean drop = k.isEmpty() || v.isEmpty();
    8283                if(!e.getKey().equals(k)) {
    83                     boolean drop = k.isEmpty() || v.isEmpty();
    8484                    if(drop || !keys.containsKey(k)) {
    8585                        newKeys.remove(e.getKey());
     
    9292                    else
    9393                        newKeys.put(k, v);
     94                } else if (drop) {
     95                    newKeys.remove(e.getKey());
    9496                }
    9597            }
Note: See TracChangeset for help on using the changeset viewer.