Changeset 22734 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-08-22T21:28:55+02:00 (14 years ago)
Author:
bomm
Message:

fix inconsistent handling of leading / in command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RequestProcessor.java

    r22733 r22734  
    8989                        command = command.substring(1);
    9090                }
    91                 if (handlers.get("/" + command) != null) {
     91                String commandWithSlash = "/" + command;
     92                if (handlers.get(commandWithSlash) != null) {
    9293                        System.out.println("RemoteControl: ignoring duplicate command " + command
    9394                                        + " with handler " + handler.getName());
     
    9596                        if(!silent) System.out.println("RemoteControl: adding command \"" +
    9697                                        command + "\" (handled by " + handler.getSimpleName() + ")");
    97                         handlers.put(command, handler);
     98                        handlers.put(commandWithSlash, handler);
    9899                }
    99100        }
Note: See TracChangeset for help on using the changeset viewer.