Details
-
Bug
-
Resolution: Fixed
-
P5
-
17, 21
-
None
-
b15
Description
In the method 'sun.nio.cs.CharsetMapping#readINDEXC2B'
void readINDEXC2B() {
char[] map = readCharArray();
for (int i = map.length - 1; i >= 0; i--) {
if (c2b == null && map[i] != -1) {
c2b = new char[map[i] + 256];
Arrays.fill(c2b, (char)UNMAPPABLE_ENCODING);
break;
}
}
c2bIndex = map;
}
Condition 'map[i] != -1' is always true. 'char' values range [0..65535]. It can't be equal to '-1'
void readINDEXC2B() {
char[] map = readCharArray();
for (int i = map.length - 1; i >= 0; i--) {
if (c2b == null && map[i] != -1) {
c2b = new char[map[i] + 256];
Arrays.fill(c2b, (char)UNMAPPABLE_ENCODING);
break;
}
}
c2bIndex = map;
}
Condition 'map[i] != -1' is always true. 'char' values range [0..65535]. It can't be equal to '-1'
Attachments
Issue Links
- relates to
-
JDK-6529796 Support JIS X 0213:2004 in existing JDK versions, especially for Windows Vista
- Closed