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

Assorted API Mods to Preferences

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • generic
    • generic

      The JSR-10 Expert Group recommends the following changes to the Preferences API (and implementation):

      Add a new (Throwable) constructor to BackingStoreException, as it will
      typically be a "chained exception."

      Modify AbstractPreferences.removeNodeSpi() to throw
      BackingStoreException. This is a no-brainer given that removeNode throws
      the same exception.

      Modify AbstractPreferences.removeNode to use childrenNamesSpi
      Spec for MAX_XXX_LENGTH said bytes when it meant characters.

      Remove newNode param from AbstractPreferences constructor. Replace it
      with protected field, which subclass constructor is obligated to set
      if appropriate.

      Rename children method to childrenNames and change its behavior to
      return an array containing the names of this nodes children instead of the
      nodes themselves. This improves performance.

      DTD for exported form: modify root and node to *require* a map, and
      modify map to contain entry* instead of entry+. This is cleaner, and
      results in much cleaner XmlSupport code. Also modify preferences to
      *require* a root.

      Change name of node conventionally associated with programs in the
      unnamed package from "<temporary>" to "<unnamed>".

      Replace "lineNumber" support in InvalidPreferencesFormatException with
      nested exception ("cause") support.

      If getSpi(String) throws an exception, it should be caught, and the default
      value returned from get(String).

      Describe the correct exception behavior of the SPI calls in AbstractPreferences.

      Provide additional information about implementor responsibilities.

      Describe locking behavior of isRemoved.

      Modify sync spec to allow call on removed node.

            jjb Josh Bloch (Inactive)
            jjb Josh Bloch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: