author | erikj |
Tue, 12 Sep 2017 19:03:39 +0200 | |
changeset 47216 | 71c04702a3d5 |
parent 44115 | jdk/test/sun/nio/cs/TestSJIS0213_SM.java@bb4e971bf5d4 |
permissions | -rw-r--r-- |
12431
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
1 |
/* |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
2 |
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
4 |
* |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
8 |
* |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
13 |
* accompanied this code). |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
14 |
* |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
18 |
* |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
21 |
* questions. |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
22 |
*/ |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
23 |
|
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
24 |
/* @test |
44115
bb4e971bf5d4
8176195: Fix misc module dependencies in jdk_core tests
xiaofeya
parents:
12431
diff
changeset
|
25 |
* @bug 7152690 |
bb4e971bf5d4
8176195: Fix misc module dependencies in jdk_core tests
xiaofeya
parents:
12431
diff
changeset
|
26 |
* @summary Initialize SJIS_0213 charset with SecurityManager enabled |
bb4e971bf5d4
8176195: Fix misc module dependencies in jdk_core tests
xiaofeya
parents:
12431
diff
changeset
|
27 |
* @modules jdk.charsets |
12431
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
28 |
*/ |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
29 |
public class TestSJIS0213_SM { |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
30 |
public static void main(String[] args) throws Throwable { |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
31 |
SecurityManager sm = System.getSecurityManager(); |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
32 |
if (sm == null) { |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
33 |
System.setSecurityManager(new SecurityManager()); |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
34 |
} |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
35 |
java.nio.charset.Charset.forName("SJIS_0213"); |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
36 |
} |
bd2ef6b4190e
7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff
changeset
|
37 |
} |