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

Conflict between System.setProperties() and System.getProperties() API specs

    XMLWordPrintable

Details

    • 1.2
    • sparc
    • solaris_2.4
    • Verified

    Description

      The API spec for class System has a contradiction between System.setGetProperties() and
      System.setProperties(). getProperties() asserts that some properties will always
      be available, while setProperties() asserts that it can overwrite ALL of the system
      properties(). Which is it?

      The spec for System.getProperties() reads in part:

             This set of system properties always includes values for the following keys:

                   Key
                              Description of associated value
              java.version
                              Java version number
              java.vendor
                              Java-vendor-specific string
              java.vendor.url
                              Java vendor URL
              java.home
                              Java installation directory
              java.class.version
                              Java class format version number
              java.class.path
                              Java classpath
              os.name
                              Operating system name
              os.arch
                              Operating system architecture
              os.version
                              Operating system version
              file.separator
                              File separator ("/" on Unix)
              path.separator
                              Path separator (":" on Unix)
              line.separator
                              Line separator ("\\n" on Unix)
              user.name
                              User account name
              user.home
                              User home directory
              user.dir
                              User's current working directory


      The spec for System.setProperties() reads in part:
      The argument becomes the current set of system properties for use by the getProperty method. If the argument is null, then the current set of system properties is forgotten.

      Attachments

        Activity

          People

            gbrachasunw Gilad Bracha (Inactive)
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: