public static String getEnvValue(String defaultValue, String... envVars) {
        String value = null;
        for (String envVar : envVars) {
            if (value == null || value.isEmpty()) {
                value = envVar;
            }
        }
        return (value == null || value.isEmpty()) ? defaultValue : value;
    }
Loop through values and return the first one that is set and non-empty.

@param defaultValue The default value to use if no environment variables are set.
@param envVars      one or more environment variable strings
@return a String with the value of the environment variable
config/src/main/java/com/yahoo/vespa/config/util/ConfigUtils.java