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 VarHandleTestAccessDouble.class, "final_v", double.class); |
67 VarHandleTestAccessDouble.class, "final_v", double.class); |
67 |
68 |
208 vhArray, VarHandleTestAccessDouble::testArrayUnsupported, |
209 vhArray, VarHandleTestAccessDouble::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, VarHandleTestAccessDouble::testArrayIndexOutOfBounds, |
212 vhArray, VarHandleTestAccessDouble::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 } |
1181 double o = (double) vh.getAndAddRelease(array, ci, 1.0d); |
1181 double o = (double) vh.getAndAddRelease(array, ci, 1.0d); |
1182 }); |
1182 }); |
1183 |
1183 |
1184 } |
1184 } |
1185 } |
1185 } |
|
1186 |
1186 } |
1187 } |
1187 |
1188 |