test/script/basic/JDK-8010946-2.js

Wed, 18 Jun 2014 12:35:42 -0700

author
katleman
date
Wed, 18 Jun 2014 12:35:42 -0700
changeset 863
6e9c4e34bc61
parent 458
4b06441b7624
child 952
6d5471a497fb
permissions
-rw-r--r--

Added tag jdk8u20-b19 for changeset b047df215de4

attila@404 1 /*
attila@404 2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
attila@404 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
attila@404 4 *
attila@404 5 * This code is free software; you can redistribute it and/or modify it
attila@404 6 * under the terms of the GNU General Public License version 2 only, as
attila@404 7 * published by the Free Software Foundation.
attila@404 8 *
attila@404 9 * This code is distributed in the hope that it will be useful, but WITHOUT
attila@404 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
attila@404 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
attila@404 12 * version 2 for more details (a copy is included in the LICENSE file that
attila@404 13 * accompanied this code).
attila@404 14 *
attila@404 15 * You should have received a copy of the GNU General Public License version
attila@404 16 * 2 along with this work; if not, write to the Free Software Foundation,
attila@404 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
attila@404 18 *
attila@404 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
attila@404 20 * or visit www.oracle.com if you need additional information or have any
attila@404 21 * questions.
attila@404 22 */
attila@404 23
attila@404 24 /**
attila@404 25 * JDK-8010946: AccessController.doPrivileged() doesn't work as expected.
attila@404 26 * This is actually a broader issue of having Dynalink correctly handle
attila@404 27 * caller-sensitive methods.
attila@404 28 *
attila@404 29 * @test
attila@404 30 * @run
attila@404 31 */
attila@404 32
attila@458 33 // Ensure this is CallerSensitiveDynamicMethod
attila@404 34 print(java.security.AccessController["doPrivileged(PrivilegedAction)"])
attila@404 35
attila@404 36 // Ensure this is not
attila@404 37 print(java.lang.String["valueOf(char)"])

mercurial