JDK-4954012 : Convert use of old sun.io APIs into new java.nio.charset APIs
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 1.2.0,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-11-13
  • Updated: 2005-02-28
  • Resolved: 2005-02-28
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 b26Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
In Mustang, we plan to remove sun.io.  The contents of this internal API have
been deprecated in favor of java.nio.charset which was introduced in Merlin.
As of Tiger, the old sun.io converters redirect to the new API.  Use of
the old converters will result in a deprecation warning at compile time.

The following list of files from the j2se workspace have been identified as
depending on sun.io:

  src/solaris/native/sun/awt/awt_Font.c
  src/windows/native/sun/windows/awt_Font.cpp

  src/share/classes/sun/awt/FontConfiguration.java
  src/share/classes/sun/awt/CharToByteSymbol.java
  src/share/classes/sun/awt/FontDescriptor.java
  src/share/classes/sun/awt/PlatformFont.java

  src/solaris/classes/sun/awt/motif/ByteToCharX11CNS11643.java
  src/solaris/classes/sun/awt/motif/ByteToCharX11GB2312.java
  src/solaris/classes/sun/awt/motif/CharToByteX11CNS11643.java
  src/solaris/classes/sun/awt/motif/ByteToCharX11KSC5601.java
  src/solaris/classes/sun/awt/motif/CharToByteX11Dingbats.java
  src/solaris/classes/sun/awt/motif/CharToByteX11GB18030_0.java
  src/solaris/classes/sun/awt/motif/CharToByteX11GB2312.java
  src/solaris/classes/sun/awt/motif/CharToByteX11GBK.java
  src/solaris/classes/sun/awt/motif/CharToByteX11JIS0201.java
  src/solaris/classes/sun/awt/motif/CharToByteX11JIS0208.java
  src/solaris/classes/sun/awt/motif/CharToByteX11GB18030_1.java
  src/solaris/classes/sun/awt/motif/CharToByteX11SunUnicode_0.java
  src/solaris/classes/sun/awt/motif/CharToByteX11JIS0212.java
  src/solaris/classes/sun/awt/motif/CharToByteX11KSC5601.java
  src/solaris/classes/sun/awt/motif/CharToByteX11Johab.java
  src/solaris/classes/sun/awt/motif/MFontConfiguration.java

  src/windows/classes/sun/awt/windows/CharToByteWingDings.java
  src/windows/classes/sun/awt/windows/WDefaultFontCharset.java
  src/windows/classes/sun/awt/windows/WFontConfiguration.java

These files (and any others which use sun.io) need to be converted to use the
new java.nio APIs in Dragonfly so that sun.io can be deleted in an early
promotion of Mustang.

-- iag@sfbay 2003-11-13

=======================


From 4954008 :
   src/share/classes/sun/print/PSPrinterJob.java
   src/share/classes/sun/font/CMap.java
   src/solaris/classes/sun/font/XMap.java
   src/solaris/classes/sun/font/NativeGlyphMapper.java
   src/share/classes/sun/java2d/HeadlessGraphicsEnvironment.java

The latter of these is probably just a matter of removing a leftover
import statement. The majority of the rest of the sun.io usage in the
other files is calling into a number of the sun/awt/motif/* files
listed above, so if those files are converted then these files need
to be converted at the same time.

Also it may be interesting to identify the sun.io classes that are actually
used and delete the rest now (assuming that at least in part the motivation
for this migration is footprint).

Also a number of the files listed above, eg FontConfiguration.java
are i18n-owned files.

###@###.### 2003-11-13
============================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
02-10-2004

EVALUATION Should try to fix this for mustang or earlier. ###@###.### 2003-11-19 The files and required changes are i18n-related, so by authority of ###@###.###, I'm recaterorizing the bug to i18n (if it's needed, please recategorize the bug to the appropriate subcategory). ###@###.### 2004-10-01
02-10-2004