Ignore:
Timestamp:
2017-07-13T21:31:24+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15016 - avoid spurious remotecontrol warnings with empty parameters

Location:
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java

    r11746 r12472  
    280280            toSelect.clear();
    281281            for (String item : args.get("select").split(",")) {
    282                 try {
    283                     toSelect.add(SimplePrimitiveId.fromString(item));
    284                 } catch (IllegalArgumentException ex) {
    285                     Main.warn(ex, "RemoteControl: invalid selection '" + item + "' ignored");
     282                if (!item.isEmpty()) {
     283                    try {
     284                        toSelect.add(SimplePrimitiveId.fromString(item));
     285                    } catch (IllegalArgumentException ex) {
     286                        Main.warn(ex, "RemoteControl: invalid selection '" + item + "' ignored");
     287                    }
    286288                }
    287289            }
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java

    r10627 r12472  
    9898        ps.clear();
    9999        for (String i : (args != null ? args.get("objects") : "").split(",\\s*")) {
    100             try {
    101                 ps.add(SimplePrimitiveId.fromString(i));
    102             } catch (IllegalArgumentException e) {
    103                 Main.warn(e, "RemoteControl: invalid selection '"+i+"' ignored.");
     100            if (!i.isEmpty()) {
     101                try {
     102                    ps.add(SimplePrimitiveId.fromString(i));
     103                } catch (IllegalArgumentException e) {
     104                    Main.warn(e, "RemoteControl: invalid selection '"+i+"' ignored.");
     105                }
    104106            }
    105107        }
Note: See TracChangeset for help on using the changeset viewer.