On 18/05/2017 09:35, Stephen Colebourne wrote:
:
I agree with Daivid that my expectation for the method System.getenv
would be that it calls native code every time it is invoked assuming
that the Javadoc didn't say otherwise (because environment variables
are outside the Java universe). As such, the choice to snapshot looks
like a significant change in behaviour, and thus compatibility.
FWIW, this behavior goes back a long time, I think it was JDK 5 when
this re-worked (by Martin). Since then there have been one or two
"surprises" when something changes to call System.getenv earlier than
before.
-Alan