Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/hotswap/tc10x002a.java
41161 views
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.BScenarios.hotswap;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
// THIS TEST IS LINE NUMBER SENSITIVE
31
32
/**
33
* <code>tc10x002a</code> is deugee's part of the tc10x002.
34
*/
35
public class tc10x002a {
36
37
public final static String brkpMethodName = "runIt";
38
public final static int brkpLineNumber1 = 61;
39
public final static int brkpLineNumber2 = 58;
40
public final static int checkLastLine1 = 61;
41
public final static int checkLastLine2 = 58;
42
public final static int INITIAL_INT_VALUE = 42;
43
public final static boolean INITIAL_BOOL_VALUE = true;
44
45
private static Log log;
46
47
public static void main (String argv[]) {
48
ArgumentHandler argHandler = new ArgumentHandler(argv);
49
log = new Log(System.err, argHandler);
50
51
runIt();
52
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
53
}
54
55
public static void runIt() {
56
int i = INITIAL_INT_VALUE;
57
// ^^^ ^^^^^^^^^^^^^^^^^ will be redefined
58
tc10x002a obj = new tc10x002a(); // brkpLineNumber2 // checkLastLine2
59
obj.method_A();
60
61
System.err.println("i = " + i); // brkpLineNumber1 // checkLastLine1
62
}
63
64
public void method_A() {
65
method_B();
66
}
67
68
public void method_B() {
69
method_C();
70
}
71
72
public void method_C() {
73
System.err.println("method_C:: line 1");
74
System.err.println("method_C:: line 2");
75
System.err.println("method_C:: line 3");
76
System.err.println("method_C:: line 4");
77
}
78
}
79
80