blob: 4f39a678b1aca54db0381be2b7885a052fd6e25e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import java.io.UnsupportedEncodingException;
public class PR36252
{
public static void main(String[] args)
{
try {
byte[] txt = new byte[] {-55, 87, -55, -42, -55, -20};
// This new String(...) should not throw an OutOfMemoryError.
String s = new String(txt, 0, 6, "MS932");
} catch (UnsupportedEncodingException e) {
// Silently ignore.
}
System.out.println("ok");
}
}
|