Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 5443)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 5444)
@@ -13,6 +13,13 @@
 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
 
+/**
+ * Adds an imagery (WMS/TMS) layer. For instance, {@code /imagery?title=...&type=...&url=...}.
+ * @since 3715
+ */
 public class ImageryHandler extends RequestHandler {
 
+    /**
+     * The remote control command name used to add an imagery layer.
+     */
     public static final String command = "imagery";
 
@@ -56,10 +63,9 @@
             String query = request.substring(request.indexOf('?') + 1);
             if (query.indexOf("url=") == 0) {
-                args.put("url", decodeURL(query.substring(4)));
+                args.put("url", decodeParam(query.substring(4)));
             } else {
                 int urlIdx = query.indexOf("&url=");
                 if (urlIdx != -1) {
-                    String url = query.substring(urlIdx + 1);
-                    args.put("url", decodeURL(query.substring(urlIdx + 5)));
+                    args.put("url", decodeParam(query.substring(urlIdx + 5)));
                     query = query.substring(0, urlIdx);
                 } else {
@@ -72,5 +78,5 @@
                     int eq = param.indexOf('=');
                     if (eq != -1) {
-                        args.put(param.substring(0, eq), param.substring(eq + 1));
+                        args.put(param.substring(0, eq), decodeParam(param.substring(eq + 1)));
                     }
                 }
@@ -80,7 +86,7 @@
     }
 
-    private String decodeURL(String url) {
+    private String decodeParam(String param) {
         try {
-            return URLDecoder.decode(url, "UTF-8");
+            return URLDecoder.decode(param, "UTF-8");
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException();
