Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/length/length001a.java
41161 views
/*1* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/222324package nsk.jdi.ArrayReference.length;2526import nsk.share.*;27import nsk.share.jpda.*;28import nsk.share.jdi.*;293031public class length001a {32public static void main (String argv[]) {33ArgumentHandler argHandler = new ArgumentHandler(argv);34Log log = new Log(System.err, argHandler);35IOPipe pipe = argHandler.createDebugeeIOPipe(log);36ClassToCheck classToCheck = new ClassToCheck();3738log.display("DEBUGEE> debugee started.");39pipe.println("ready");40String instruction = pipe.readln();41if (instruction.equals("quit")) {42log.display("DEBUGEE> \"quit\" signal recieved.");43log.display("DEBUGEE> completed succesfully.");44System.exit(95);45}46log.complain("DEBUGEE FAILURE> unexpected signal "47+ "(no \"quit\") - " + instruction);48log.complain("DEBUGEE FAILURE> TEST FAILED");49System.exit(97);50}51}5253class ClassToCheck {54// User class and interface55static class Class {}56static interface Inter {}5758static boolean z1[]={};59static boolean z2[][]={z1, z1, z1, z1, z1, z1, z1};60static byte b1[]={0};61static byte b2[][]={b1, b1, b1, b1, b1, b1};62static char c1[]={'\u00ff', '\u0f0f'};63static char c2[][]={c1, c1, c1, c1, c1};64static double d1[]={0, 1, -2};65static double d2[][]={d1, d1, d1, d1};66static float f1[]={0, 1, -2, 3};67static float f2[][]={f1, f1, f1};68static int i1[]={0, 1, -2, 3, -4};69static int i2[][]={i1, i1};70static long l1[]={0, 1, -2, 3, -4, 5};71static long l2[][]={l1};72static short r1[]={0, 1, -2, 3, -4, 5, -6};73static short r2[][]={};7475static final long lF1[]={1, -2, 3};76static private long lP1[][]={{1}, {-2}, {3}};77static public long lU1[][][]={{{1}}, {{-2}}};78static protected long lR1[][][][]={{{{1}}}, {{{-2}}}};79static transient long lT1[][][][][]={{{{{1}}}}};80static volatile long lV1[][][][][][]={{{{{{1}}}}}};8182static Inter E1[]={};83static Inter E2[][]={E1, E1};84static Class X1[]={new Class()};85static Class X2[][]={X1};86static Object O1[]={new Object(), new Object()};87static Object O2[][]={};8889static final Long LF1[]={Long.valueOf(1), Long.valueOf(-2), Long.valueOf(3)};90static private Long LP1[][]={{Long.valueOf(1)}, {Long.valueOf(2)}, {Long.valueOf(3)}};91static public Long LU1[][][]={{{Long.valueOf(1)}}, {{Long.valueOf(-2)}}};92static protected Long LR1[][][][]={{{{Long.valueOf(1)}}}, {{{Long.valueOf(-2)}}}};93static transient Long LT1[][][][][]={{{{{Long.valueOf(1)}}}}};94static volatile Long LV1[][][][][][]={{{{{{Long.valueOf(1)}}}}}};9596static final Inter EF1[]={};97static private Inter EP1[][]={{}};98static public Inter EU1[][][]={{{}}};99static protected Inter ER1[][][][]={{{{}}}};100static transient Inter ET1[][][][][]={{{{{}}}}};101static volatile Inter EV1[][][][][][]={{{{{{}}}}}};102}103104105