mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-25 22:37:33 +00:00
Merge pull request #1365 from fgreinacher/fix/properties-env
feat: support alternate environment variable names
This commit is contained in:
commit
32429afbb0
@ -210,11 +210,16 @@ public class SecurityUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getenv(String name) {
|
public static String getenv(String name) {
|
||||||
final String env = System.getProperty(name);
|
String env = System.getProperty(name);
|
||||||
if (StringUtils.isNotEmpty(env))
|
if (StringUtils.isNotEmpty(env))
|
||||||
return env;
|
return env;
|
||||||
|
|
||||||
return System.getenv(name);
|
env = System.getenv(name);
|
||||||
|
if (StringUtils.isNotEmpty(env))
|
||||||
|
return env;
|
||||||
|
|
||||||
|
final String alternateName = name.replace(".", "_").toUpperCase();
|
||||||
|
return System.getenv(alternateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user