Here you can find the source of parsePortNumber(String port, int defaultPort)
static int parsePortNumber(String port, int defaultPort)
//package com.java2s; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Main { static final Logger LOGGER = LoggerFactory .getLogger("com.force.sdk.connector"); static int parsePortNumber(String port, int defaultPort) { int proxyPort = defaultPort; if (port != null) { try { proxyPort = Integer.parseInt(port); } catch (NumberFormatException ne) { LOGGER.warn("Unable to parse port '" + port + "'. Using default port number " + defaultPort, ne); }/*from ww w. j a va 2 s .c o m*/ } return proxyPort; } }