Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdb/eval/eval001/eval001a.java
40955 views
/*1* Copyright (c) 2002, 2018, 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*/2223package nsk.jdb.eval.eval001;2425import nsk.share.*;26import nsk.share.jpda.*;27import nsk.share.jdb.*;2829import java.io.*;3031/* This is debuggee aplication */32public class eval001a {3334static eval001a _eval001a = new eval001a();3536public static void main(String args[]) {37System.exit(eval001.JCK_STATUS_BASE + _eval001a.runIt(args, System.out));38}3940static void lastBreak () {}4142public int runIt(String args[], PrintStream out) {43JdbArgumentHandler argumentHandler = new JdbArgumentHandler(args);44Log log = new Log(out, argumentHandler);4546MyClass myClass = new MyClass("abcde");47int i = 111;48int j = 222;49int k = 444;50double[][][] test = new double[2][2][2];5152synchronized (this) {53lastBreak();54}5556log.display("Debuggee PASSED");57return eval001.PASSED;58}5960static private int myStaticField = Integer.MIN_VALUE;61protected long myInstanceField;62public MyClass[][] myArrayField;6364private eval001a () {65myArrayField = new MyClass[][] {new MyClass[] {new MyClass("ABCDE")}};66myInstanceField = Long.MAX_VALUE;67}6869synchronized private int myMethod() {70return Integer.MAX_VALUE;71}7273static class MyClass {74String line;7576public MyClass (String s) {77line = s;78}7980public String toString() {81return line;82}83}8485public double testPrimitiveArray(double[][][] d){86return 1.0;87}88}899091