Source:
public void init(final DaemonContext context) { final File confFile = PropertiesUtil.findConfigFile("server.properties"); if (confFile == null) { LOG.warn(String.format("Server configuration file not found. Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); return; } LOG.info("Server configuration file found: " + confFile.getAbsolutePath()); try { final Properties properties = PropertiesUtil.loadFromFile(confFile); if (properties == null) { return; } setBindInterface(properties.getProperty(BIND_INTERFACE, "")); setContextPath(properties.getProperty(CONTEXT_PATH, "/client")); setHttpEnable(Boolean.valueOf(properties.getProperty(HTTP_ENABLE, "true"))); setHttpPort(Integer.valueOf(properties.getProperty(HTTP_PORT, "8080"))); setHttpsEnable(Boolean.valueOf(properties.getProperty(HTTPS_ENABLE, "false"))); setHttpsPort(Integer.valueOf(properties.getProperty(HTTPS_PORT, "8443"))); setKeystoreFile(properties.getProperty(KEYSTORE_FILE)); setKeystorePassword(properties.getProperty(KEYSTORE_PASSWORD)); setWebAppLocation(properties.getProperty(WEBAPP_DIR)); setAccessLogFile(properties.getProperty(ACCESS_LOG, "access.log")); setSessionTimeout(Integer.valueOf(properties.getProperty(SESSION_TIMEOUT, "30"))); } catch (final IOException e) { LOG.warn("Failed to load configuration from server.properties file", e); } finally { if (!httpEnable && !httpsEnable) { setHttpEnable(true); } } LOG.info(String.format("Initializing server daemon on %s:%s, with https.enabled=%s, https.port=%s, context.path=%s", bindInterface, httpPort, httpsEnable, httpsPort, contextPath)); }

Target:
public void init(final DaemonContext context) { final File confFile = PropertiesUtil.findConfigFile("server.properties"); if (confFile == null) { LOG.warn(String.format("Server configuration file not found. Initializing server daemon on %s, with http.enable=%s, http.port=%s, https.enable=%s, https.port=%s, context.path=%s", bindInterface, httpEnable, httpPort, httpsEnable, httpsPort, contextPath)); return; } LOG.info("Server configuration file found: " + confFile.getAbsolutePath()); try { final Properties properties = PropertiesUtil.loadFromFile(confFile); if (properties == null) { return; } setBindInterface(properties.getProperty(BIND_INTERFACE, "")); setContextPath(properties.getProperty(CONTEXT_PATH, "/client")); setHttpEnable(Boolean.valueOf(properties.getProperty(HTTP_ENABLE, "true"))); setHttpPort(Integer.valueOf(properties.getProperty(HTTP_PORT, "8080"))); setHttpsEnable(Boolean.valueOf(properties.getProperty(HTTPS_ENABLE, "false"))); setHttpsPort(Integer.valueOf(properties.getProperty(HTTPS_PORT, "8443"))); setKeystoreFile(properties.getProperty(KEYSTORE_FILE)); setKeystorePassword(properties.getProperty(KEYSTORE_PASSWORD)); setWebAppLocation(properties.getProperty(WEBAPP_DIR)); setAccessLogFile(properties.getProperty(ACCESS_LOG, "access.log")); setSessionTimeout(Integer.valueOf(properties.getProperty(SESSION_TIMEOUT, "30"))); } catch (final IOException e) { LOG.warn("Failed to load configuration from server.properties file", e); } finally { if (!httpEnable && !httpsEnable) { setHttpEnable(true); LOG.warn("Server configuration malformed, neither http nor https is enabled, http will be enabled."); } } LOG.info(String.format("Initializing server daemon on %s, with http.enable=%s, http.port=%s, https.enable=%s, https.port=%s, context.path=%s", bindInterface, httpEnable, httpPort, httpsEnable, httpsPort, contextPath)); }