Re: System.getEnv(String name, String def)

2021-02-18 Thread Loïc MATHIEU
gt; >> Hi Loic, > >> You can use Optional.OfNullable() which is a kind of the general bridge > between > >> the nullable world and the non-nullable one. > >> > >>var fooOptional = Optional.ofNullable(System.getenv("FOO")); > >>

System.getEnv(String name, String def)

2021-02-15 Thread Loïc MATHIEU
Hello, I wonder if there has already been some discussion to provide a System.getEnv(String name, String def) method that allows to return a default value in case the env variable didn't exist. When using system properties instead of env variable, we do have a System.getProperty(String key,