Clarify the read-once behaviour of System.getenv

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 6, 7, 8, 9, 10
    • Component/s: core-libs
    • None

      The system environment variables are read and cached lazily, on first invocation of getenv. This can lead to some confusion [1], as one could have a reasonable expectation that getenv would read the "live" environment variables on every invocation ( thus seeing any updates or modifications to them ). The specification should document, or even mandate, this behaviour.

      [1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-May/047588.html

            Assignee:
            Chris Hegarty
            Reporter:
            Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: