1 /* 2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 package nsk.jdi.ReferenceType._bounds_; 25 26 import nsk.share.*; 27 import nsk.share.jpda.*; 28 import nsk.share.jdi.*; 29 30 /** 31 * <code>bounds002a</code> is deugee's part of the bounds002. 32 */ 33 public class bounds002a { 34 35 public final static String testedFieldName = "testedObj"; 36 public final static String testedMethod = "justMethod"; 37 38 private static bounds002b testedObj = new bounds002b(); 39 main(String argv[])40 public static void main (String argv[]) { 41 ArgumentHandler argHandler = new ArgumentHandler(argv); 42 Log log = new Log(System.err, argHandler); 43 IOPipe pipe = argHandler.createDebugeeIOPipe(log); 44 pipe.println(bounds002.SGNL_READY); 45 String instr = pipe.readln(); 46 if (instr.equals(bounds002.SGNL_QUIT)) { 47 log.display("completed succesfully."); 48 System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE); 49 } 50 51 log.complain("DEBUGEE> unexpected signal of debugger."); 52 System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE); 53 } 54 } 55 56 class bounds002b { 57 private static Object testedObj; justMethod(int val)58 public static int justMethod(int val) { 59 return val; 60 } 61 } 62