private int getPort(String portString) { int port = -1; try { port = Integer.parseInt(portString); } catch (Exception e) { // HEY! Why are you not checking BEFORE the Exception? // Well, it might be slower to call isToken() on strings that consist // of just numbers. We just do this stuff if necessary... try { portString = sysProps.get(StringUtils.stripToken(portString)); if (portString != null && portString.length() > 0) { port = Integer.parseInt(portString); } } catch (Exception e2) { // GI but not GO ! } } return port; }
private int getPort(String portString) { int port = -1; try { port = Integer.parseInt(portString); } catch (Exception e) { // HEY! Why are you not checking BEFORE the Exception? // Well, it might be slower to call isToken() on strings that consist // of just numbers. We just do this stuff if necessary... try { portString = sysProps.get(StringUtils.stripToken(portString)); if (portString != null && portString.length() > 0) { port = Integer.parseInt(portString); } } catch (Exception e2) { // GI but not GO ! } } return port; }
private int getPort(String portString) { int port = -1; try { port = Integer.parseInt(portString); } catch (Exception e) { // HEY! Why are you not checking BEFORE the Exception? // Well, it might be slower to call isToken() on strings that consist // of just numbers. We just do this stuff if necessary... try { portString = sysProps.get(StringUtils.stripToken(portString)); if (portString != null && portString.length() > 0) { port = Integer.parseInt(portString); } } catch (Exception e2) { // GI but not GO ! } } return port; }
if (StringUtils.isToken(addr)) addr = sysProps.get( StringUtils.stripToken(addr)); boolean secure = false; String protocol = atts.get("protocol");
if (StringUtils.isToken(addr)) addr = sysProps.get( StringUtils.stripToken(addr)); boolean secure = false; String protocol = atts.get("protocol");
if (StringUtils.isToken(addr)) addr = sysProps.get( StringUtils.stripToken(addr)); boolean secure = false; String protocol = atts.get("protocol");