JDK-4948142 : Handler and XMLFormatter should not call old sun.io apis
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.logging
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-11-04
  • Updated: 2005-01-22
  • Resolved: 2005-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b21Fixed
Related Reports
Relates :  
Description
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

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: dragon
11-08-2004

EVALUATION schedule for 1.5.1
11-08-2004