-
Bug
-
Resolution: Duplicate
-
P2
-
5.0u4
-
generic
-
generic
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);
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);
- duplicates
-
JDK-4937509 (tz) sun.tools.javazic.Gen uses String.getBytes - native encoding incorrectly assumed
-
- Resolved
-
- relates to
-
JDK-6317399 umbrella bug: various J2SE 5.0 encoding bugs with limited number of root causes
-
- Closed
-