dhlaluku commented on a change in pull request #3091: Address reviewers from abandoned PR #1597. URL: https://github.com/apache/cloudstack/pull/3091#discussion_r247992136
########## File path: services/console-proxy/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java ########## @@ -23,20 +23,34 @@ public class ConsoleProxyHttpHandlerHelper { private static final Logger s_logger = Logger.getLogger(ConsoleProxyHttpHandlerHelper.class); + private static final String AND = "&"; + private static final String EQUALS = "="; + private static final String HOST = "host"; + private static final String PORT = "port"; + private static final String SID = "sid"; + private static final String TAG = "tag"; + private static final String CONSOLE_URL = "consoleurl"; + private static final String SESSION_REF = "sessionref"; + private static final String TICKET = "ticket"; + private static final String LOCALE = "locale"; + private static final String HYPERV_HOST = "hypervHost"; + private static final String USERNAME = "username"; + private static final String PASSWORD = "password"; + private static final String TOKEN = "token"; public static Map<String, String> getQueryMap(String query) { - String[] params = query.split("&"); + String[] params = query.split(AND); Map<String, String> map = new HashMap<String, String>(); Review comment: This variable should be named "tokenMap" or something similar to show that it should only store a token key-value item. This will save computation by getting rid of the guardUserInput(map) call in Line #59 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services