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

System.setProperties() should be replaced by add/removeProperty()

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P5
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      Name: jl125535 Date: 04/15/2004


      A DESCRIPTION OF THE REQUEST :
      System.setProperties(Properties p) replaces the properties of the system without any consideration.

      I think either this method should add to the previously added properties (this needs a change in implementation: not recommended)or this method should be discarded and a new method like "addProperties" should be added which just adds to the system properties if user want to add more than one properties at a time. I know there is a work around for that but still this method causes confusion.


      JUSTIFICATION :
      The propblem lies when you call this method and see that all of the properties are replaced - even those which are not set by your application.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      ACTUAL -
      replaces already added properties.


      CUSTOMER SUBMITTED WORKAROUND :
      Properties p = System.getProperties();
      p.put("somekey","somevalue");
      System.setProperties(p);
      (Incident Review ID: 208518)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              martin Martin Buchholz
              Reporter:
              jleesunw Jon Lee (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: