Source:
<code>public static void loadRuntimeConfiguration(RuntimeInfo runtimeInfo) throws IOException { RuntimeEL.runtimeInfo = runtimeInfo; Configuration configuration = new Configuration(); File configFile = new File(runtimeInfo.getConfigDir(), SDC_PROPERTIES); if (configFile.exists()) { try(FileReader reader = new FileReader(configFile)) { configuration.load(reader); } catch (IOException ex) { LOG.error("Error loading configuration file : {}", configFile, ex.getMessage()); throw new RuntimeException(ex); } AUTH_TOKEN = runtimeInfo.getAppAuthToken(); <START> HOSTNAME = configuration.get(WebServerTask.HTTP_BIND_HOST, defaultHostnameMethod); <END> RUNTIME_CONF_PROPS = new Properties(); String runtimeConfLocation = configuration.get(RUNTIME_CONF_LOCATION_KEY, RUNTIME_CONF_LOCATION_DEFAULT); if(runtimeConfLocation.equals(RUNTIME_CONF_LOCATION_DEFAULT)) { for(String confName : configuration.getNames()) { if(confName.startsWith(RUNTIME_CONF_PREFIX)) { RUNTIME_CONF_PROPS.put(confName.substring(RUNTIME_CONF_PREFIX.length()).trim(), configuration.get(confName, (String)null)); } } } else { File runtimeConfFile = new File(runtimeInfo.getConfigDir(), runtimeConfLocation); try (FileInputStream fileInputStream = new FileInputStream(runtimeConfFile)) { RUNTIME_CONF_PROPS.load(fileInputStream); } catch (IOException e) { LOG.error("Could not read '{}': {}", runtimeConfFile.getAbsolutePath(), e.toString(), e); throw e; } } } else { LOG.error("Error did not find sdc.properties at expected location: {}", configFile); } }</code><technical_language>a bit simpler a bit intrusive do in line of: String defaultHostname = ""; try { defaultHostname = InetAddress.getLocalHost().getCanonicalHostName()); } catch (...) HOSTNAME = configuration.get(WebServerTask.HTTP_BIND_HOST, defaultHostname);</technical_language>

Target:
public static void loadRuntimeConfiguration(RuntimeInfo runtimeInfo) throws IOException { RuntimeEL.runtimeInfo = runtimeInfo; Configuration configuration = new Configuration(); File configFile = new File(runtimeInfo.getConfigDir(), SDC_PROPERTIES); if (configFile.exists()) { try(FileReader reader = new FileReader(configFile)) { configuration.load(reader); } catch (IOException ex) { LOG.error("Error loading configuration file : {}", configFile, ex.getMessage()); throw new RuntimeException(ex); } AUTH_TOKEN = runtimeInfo.getAppAuthToken(); HOSTNAME = configuration.get(WebServerTask.HTTP_BIND_HOST, null); if (HOSTNAME==null) { HOSTNAME = configuration.get(WebServerTask.HTTP_BIND_HOST,defaultHostnameMethod.get()); } RUNTIME_CONF_PROPS = new Properties(); String runtimeConfLocation = configuration.get(RUNTIME_CONF_LOCATION_KEY, RUNTIME_CONF_LOCATION_DEFAULT); if(runtimeConfLocation.equals(RUNTIME_CONF_LOCATION_DEFAULT)) { for(String confName : configuration.getNames()) { if(confName.startsWith(RUNTIME_CONF_PREFIX)) { RUNTIME_CONF_PROPS.put(confName.substring(RUNTIME_CONF_PREFIX.length()).trim(), configuration.get(confName, (String)null)); } } } else { File runtimeConfFile = new File(runtimeInfo.getConfigDir(), runtimeConfLocation); try (FileInputStream fileInputStream = new FileInputStream(runtimeConfFile)) { RUNTIME_CONF_PROPS.load(fileInputStream); } catch (IOException e) { LOG.error("Could not read '{}': {}", runtimeConfFile.getAbsolutePath(), e.toString(), e); throw e; } } } else { LOG.error("Error did not find sdc.properties at expected location: {}", configFile); } }