jdk/test/sun/nio/cs/TestSJIS0213_SM.java
author cl
Thu, 25 Jul 2013 03:18:14 -0700
changeset 18968 de18c7eb70e2
parent 12431 bd2ef6b4190e
child 44115 bb4e971bf5d4
permissions -rw-r--r--
Added tag jdk8-b100 for changeset e7387def0ed3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    25
   @bug 7152690
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    26
   @summary Initialize SJIS_0213 charset with SecurityManager enabled
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    27
 */
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    28
public class TestSJIS0213_SM {
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    29
    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
    30
        SecurityManager sm = System.getSecurityManager();
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    31
        if (sm == null) {
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    32
            System.setSecurityManager(new SecurityManager());
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    33
        }
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    34
        java.nio.charset.Charset.forName("SJIS_0213");
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    35
    }
bd2ef6b4190e 7152690: Initialization error with charset SJIS_0213 when security manager is enabled
sherman
parents:
diff changeset
    36
}