equal
deleted
inserted
replaced
58 |
58 |
59 VarHandle vhStaticFinalField; |
59 VarHandle vhStaticFinalField; |
60 |
60 |
61 VarHandle vhArray; |
61 VarHandle vhArray; |
62 |
62 |
|
63 |
63 @BeforeClass |
64 @BeforeClass |
64 public void setup() throws Exception { |
65 public void setup() throws Exception { |
65 vhFinalField = MethodHandles.lookup().findVarHandle( |
66 vhFinalField = MethodHandles.lookup().findVarHandle( |
66 VarHandleTestAccessShort.class, "final_v", short.class); |
67 VarHandleTestAccessShort.class, "final_v", short.class); |
67 |
68 |
208 vhArray, VarHandleTestAccessShort::testArrayUnsupported, |
209 vhArray, VarHandleTestAccessShort::testArrayUnsupported, |
209 false)); |
210 false)); |
210 cases.add(new VarHandleAccessTestCase("Array index out of bounds", |
211 cases.add(new VarHandleAccessTestCase("Array index out of bounds", |
211 vhArray, VarHandleTestAccessShort::testArrayIndexOutOfBounds, |
212 vhArray, VarHandleTestAccessShort::testArrayIndexOutOfBounds, |
212 false)); |
213 false)); |
213 |
|
214 // Work around issue with jtreg summary reporting which truncates |
214 // Work around issue with jtreg summary reporting which truncates |
215 // the String result of Object.toString to 30 characters, hence |
215 // the String result of Object.toString to 30 characters, hence |
216 // the first dummy argument |
216 // the first dummy argument |
217 return cases.stream().map(tc -> new Object[]{tc.toString(), tc}).toArray(Object[][]::new); |
217 return cases.stream().map(tc -> new Object[]{tc.toString(), tc}).toArray(Object[][]::new); |
218 } |
218 } |
1290 checkIOOBE(() -> { |
1290 checkIOOBE(() -> { |
1291 short o = (short) vh.getAndBitwiseXorRelease(array, ci, (short)0x0123); |
1291 short o = (short) vh.getAndBitwiseXorRelease(array, ci, (short)0x0123); |
1292 }); |
1292 }); |
1293 } |
1293 } |
1294 } |
1294 } |
|
1295 |
1295 } |
1296 } |
1296 |
1297 |