JDK-6328471 : encoding bug (6317399): sun/tools/javazic/Gen.java
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 5.0u4
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-24
  • Updated: 2010-04-03
  • Resolved: 2005-09-25
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.
Other
5.0u4Resolved
Related Reports
Duplicate :  
Relates :  
Description
Please first read Comments section here and in 6317399.

In sun/tools/javazic/Gen.java (5.0u4):

// wrong line 223
	    byte[] b = Main.getVersionName().getBytes();
// correction
	    byte[] b = Main.getVersionName().getBytes("US-ASCII");
// wrong line 240
		    raf.write(key.getBytes(), 0, size);
// correction
		    raf.write(key.getBytes("US-ASCII"), 0, size);
// wrong lines 296-298
		raf.write(key.getBytes(), 0, key_size);
		raf.writeByte(alias_size & 0xFF);
		raf.write(alias.getBytes(), 0, alias_size);
// correction
		raf.write(key.getBytes("US-ASCII"), 0, key_size);
		raf.writeByte(alias_size & 0xFF);
		raf.write(alias.getBytes("US-ASCII"), 0, alias_size);

Comments
SUGGESTED FIX See Description.
24-09-2005