File tree 2 files changed +5
-5
lines changed
test/hotspot/jtreg/runtime
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ static class LIClass {
110
110
public static final WhiteBox WB = WhiteBox .getWhiteBox ();
111
111
112
112
static final long INT_OFFSET ;
113
- static final int INT_ARRAY_OFFSET ;
114
- static final int LONG_ARRAY_OFFSET ;
113
+ static final long INT_ARRAY_OFFSET ;
114
+ static final long LONG_ARRAY_OFFSET ;
115
115
static {
116
116
if (!Platform .is64bit () || WB .getBooleanVMFlag ("UseCompactObjectHeaders" )) {
117
117
INT_OFFSET = 8 ;
@@ -151,7 +151,7 @@ static public void main(String[] args) {
151
151
Asserts .assertEquals (unsafe .arrayBaseOffset (double [].class ), LONG_ARRAY_OFFSET , "Misplaced double array base" );
152
152
boolean narrowOops = System .getProperty ("java.vm.compressedOopsMode" ) != null ||
153
153
!Platform .is64bit ();
154
- int expected_objary_offset = narrowOops ? INT_ARRAY_OFFSET : LONG_ARRAY_OFFSET ;
154
+ long expected_objary_offset = narrowOops ? INT_ARRAY_OFFSET : LONG_ARRAY_OFFSET ;
155
155
Asserts .assertEquals (unsafe .arrayBaseOffset (Object [].class ), expected_objary_offset , "Misplaced object array base" );
156
156
}
157
157
}
Original file line number Diff line number Diff line change 37
37
public class GetField {
38
38
public static void main (String args []) throws Exception {
39
39
Unsafe unsafe = Unsafe .getUnsafe ();
40
- // Unsafe.INVALID_FIELD_OFFSET is a static final int field,
40
+ // Unsafe.INVALID_FIELD_OFFSET is a static final long field,
41
41
// make sure getField returns the correct field
42
42
Field field = Unsafe .class .getField ("INVALID_FIELD_OFFSET" );
43
43
assertNotEquals (field .getModifiers () & Modifier .FINAL , 0 );
44
44
assertNotEquals (field .getModifiers () & Modifier .STATIC , 0 );
45
- assertEquals (field .getType (), int .class );
45
+ assertEquals (field .getType (), long .class );
46
46
}
47
47
}
You can’t perform that action at this time.
0 commit comments