Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8180592

Clarify the read-once behaviour of System.getenv

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3
    • tbd
    • 6, 7, 8, 9, 10
    • core-libs
    • None

    Description

      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

      Attachments

        Activity

          People

            chegar Chris Hegarty
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: