Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/getValue/getvalue003a.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.ArrayReference.getValue;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
31
public class getvalue003a {
32
33
public final static String[] NON_INIT_FIELDS = {"staticIntArr2C",
34
"staticIntArrC",
35
"staticObjArrC"};
36
37
static getvalue003aClassToCheck testedObj = new getvalue003aClassToCheck();
38
39
40
public static void main (String argv[]) {
41
42
ArgumentHandler argHandler = new ArgumentHandler(argv);
43
Log log = new Log(System.err, argHandler);
44
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
45
pipe.println("ready");
46
47
String instruction = pipe.readln();
48
49
if ( instruction.equals("quit") ) {
50
log.display("DEBUGEE> \"quit\" signal recieved.");
51
log.display("DEBUGEE> completed succesfully.");
52
System.exit(getvalue003.TEST_PASSED + getvalue003.JCK_STATUS_BASE);
53
}
54
log.complain("DEBUGEE FAILURE> unexpected signal "
55
+ "(no \"quit\") - " + instruction);
56
log.complain("DEBUGEE FAILURE> TEST FAILED");
57
System.exit(getvalue003.TEST_FAILED + getvalue003.JCK_STATUS_BASE);
58
}
59
}
60
61
class getvalue003aClassToCheck {
62
static int[] staticIntArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
63
static Object[] staticObjArr = {null, null, null, null, null, null, null, null, null, null};
64
65
static int[][] staticIntArr2 = {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
66
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}};
67
68
static int[][] staticIntArr2C; // not initialized
69
70
static int[] staticIntArrC; // not initialized
71
public int[] publicIntArrC;
72
protected int[] protecIntArrC;
73
private int[] privatIntArrC;
74
75
static Object[] staticObjArrC; // not initialized
76
public Object[] publicObjArrC;
77
protected Object[] protecObjArrC;
78
private Object[] privatObjArrC;
79
80
public getvalue003aClassToCheck() {
81
publicIntArrC = createIntArray();
82
protecIntArrC = createIntArray();
83
privatIntArrC = createIntArray();
84
85
publicObjArrC = createObjArray();
86
protecObjArrC = createObjArray();
87
privatObjArrC = createObjArray();
88
}
89
90
static private int[] createIntArray() {
91
int[] array = new int[10];
92
for ( int i = 0; i < 10; i++ ) array[i] = i;
93
return array;
94
}
95
96
static private Object[] createObjArray() {
97
Object[] array = new Object[10];
98
return array;
99
}
100
101
}
102
103