2362N/A * Copyright (c) 2001, 2007, 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 * @summary Test fix for JDI: methods Accessible.is...() lie about array types 0N/A * @run build TestScaffold VMConnection TargetListener TargetAdapter 0N/A * @run main AccessSpecifierTest 0N/A /********** target program **********/ 0N/A/** Sample package-private interface. */ 0N/A/** Sample package-private class. */ 0N/A/** Sample package-private class. */ 0N/A private static class U {}
0N/A protected static class V {}
0N/A public static class W {}
0N/A static class P {}
// package private 0N/A /********** test program **********/ 0N/A /** Known Accessible Information about the Debugee. */ 0N/A {
"z",
"private",
"public",
"public"},
0N/A {
"b",
"public",
"public",
"public"},
0N/A {
"s",
"protected",
"public",
"public"},
0N/A {
"i",
"package private",
"public",
"public"},
0N/A {
"l",
"private",
"public",
"public"},
0N/A {
"c",
"public",
"public",
"public"},
0N/A {
"f",
"protected",
"public",
"public"},
0N/A {
"d",
"package private",
"public",
"public"},
0N/A {
"java.lang.Boolean" ,
"public"},
0N/A {
"java.lang.Character",
"public"},
0N/A {
"java.lang.Class" ,
"public"},
0N/A {
"java.lang.Double" ,
"public"},
0N/A {
"java.lang.Float" ,
"public"},
0N/A {
"java.lang.Integer" ,
"public"},
0N/A {
"java.lang.Long" ,
"public"},
0N/A {
"java.lang.String" ,
"public"},
0N/A {
"java.lang.Object" ,
"public"},
0N/A {
"AccessSpecifierTarg",
"package private"},
0N/A {
"AccessSpecifierPackagePrivateClass",
"package private"},
0N/A {
"AccessSpecifierPackagePrivateInterface",
"package private"},
0N/A {
"AccessSpecifierTarg$StaticInterface",
"private"},
0N/A {
"AccessSpecifierTarg$U",
"private"},
0N/A {
"AccessSpecifierTarg$V",
"protected"},
0N/A {
"AccessSpecifierTarg$W",
"public"},
0N/A {
"AccessSpecifierTarg$P",
"package private"}
0N/A /********** test core **********/ 0N/A * Get to the top of ready() 0N/A for (
int j =
0; j <
3; j++) {
0N/A true,
false,
false,
false);
0N/A false,
true,
false,
false);
0N/A false,
false,
true,
false);
0N/A false,
false,
false,
true);
0N/A " (primitive scalar type)");
0N/A for (
int j =
0; j <
3; j++) {
0N/A * resume the target listening for events 0N/A * deal with results of test 0N/A * if anything has called failure("foo") testFailed will be true