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

Preference API writes capital letter with a slash (/) before the letter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.0
    • core-libs
    • x86
    • windows_98



      Name: nt126004 Date: 03/07/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)


      FULL OPERATING SYSTEM VERSION :

      Windows 98 [Version 4.10.1998]

      A DESCRIPTION OF THE PROBLEM :
      When adding preferences where either the key or value
      contain capital letters the key/value is written with a
      slash,

      prefs.put("HelloWorld", "hello world")

      is entered into the registry as

      key /Hello/World
      value hello /World

      As far as I can tell the program in question is working fine. The only issue
      would be if I needed to access these properties from a non-java program.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1.
      2.
      3.

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.util.prefs.Preferences;

      public class PrefTest {

      public static void main(String[] args) {
      PrefTest p = new PrefTest();
      }

      public PrefTest() {
      Preferences pref = Preferences.systemRoot();
      pref.put("HelloWorld", "hello World");
      }
      }


      ---------- END SOURCE ----------
      (Review ID: 139639)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: