2362N/A * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @bug 4472841 4703640 4705681 4705683 4833095 5005831 0N/A * @summary Verify that constructor exceptions are thrown as expected. 0N/A private static final byte [] b = {
0x48,
0x69,
0x2c,
0x20,
0N/A 0x44,
0x75,
0x6b,
0x65,
0x21 };
0N/A private static final char [] c
0N/A private static boolean ok =
true;
0N/A // -- Constructors -- 0N/A else // (cs instanceof Charset) 0N/A +
"String charsetName)");
0N/A +
"Charset charset)");
0N/A else // (cs instanceof Charset) 0N/A +
" throws UnsupportedEncodingException");
0N/A /* 4830291 (javac generics bug) causes this test to fail 0N/A System.out.println("compareTo(Object o)"); 0N/A tryCatch(" (Object) null", NullPointerException.class, new Runnable() { 0N/A "foo".compareTo((Object) null); 0N/A +
" int ooffset, int len)");
0N/A +
" String other, int ooffset, int len)");
0N/A // -- Constructors -- 0N/A // String(byte ascii[], int hibyte, int offset, int count) 0N/A // String(byte bytes[], int offset, int length, String charsetName) 0N/A // throws UnsupportedEncodingException 0N/A // String(byte bytes[], int offset, int length, Charset charset) 0N/A // String(byte bytes[], String charsetName) 0N/A // throws UnsupportedEncodingException 0N/A // String(byte bytes[], Charset charset) 0N/A // getBytes(Charset) 0N/A // regionMatches(boolean, int, String, int, int) 0N/A indexOf();
// indexOf(String), indexOf(String, int), 0N/A split();
// split(String, int), split(String) 0N/A // valueOf(char [], int, int) 0N/A // copyValueOf(char [])