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

Handler and XMLFormatter should not call old sun.io apis

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • core-libs

      In Mustang, we plan to remove sun.io. The logger should not use this old
      API in anticipation of this change.

      I believe that this approximates the changes that need to be made:

      java.util.logging.Handler:

      old:

        if (encoding != null) {
            // Check the encoding exists.
            sun.io.CharToByteConverter.getConverter(encoding);
        }
        this.encoding = encoding;

      new:

        if (encoding != null
           && !java.nio.charset.Charset.isSupported(encoding))
           throw new UnsupportedEncodingException(encoding);
        }


      java.util.logging.XMLFormatter.getHead:

      old:

        encoding = sun.io.Converters.getDefaultEncodingName();

      new:

        encoding = java.nio.charset.Charset.defaultCharset().name();


      -- iag@sfbay 2003-11-03

            caustinsunw Calvin Austin (Inactive)
            iris Iris Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: