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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P5
    • None
    • Affects Version/s: 1.4.2
    • Component/s: core-libs
    • x86
    • windows_2000

      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: