private Integer parsePort(String configPort) { Integer port = null; if (configPort != null && configPort.length() > 0) { try { Integer intPort = Integer.parseInt(configPort); if (isInvalidPort(intPort)) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } port = intPort; } catch (Exception e) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } } return port; }
private Integer parsePort(String configPort) { Integer port = null; if (configPort != null && configPort.length() > 0) { try { Integer intPort = Integer.parseInt(configPort); if (isInvalidPort(intPort)) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } port = intPort; } catch (Exception e) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } } return port; }
private Integer parsePort(String configPort) { Integer port = null; if (configPort != null && configPort.length() > 0) { try { Integer intPort = Integer.parseInt(configPort); if (isInvalidPort(intPort)) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } port = intPort; } catch (Exception e) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } } return port; }
private Integer parsePort(String configPort) { Integer port = null; if (configPort != null && configPort.length() > 0) { try { Integer intPort = Integer.parseInt(configPort); if (isInvalidPort(intPort)) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } port = intPort; } catch (Exception e) { throw new IllegalArgumentException("Specified invalid port from env value:" + configPort); } } return port; }