提交 a576565e 编写于 作者: P psandoz

8024182: test/java/util/Arrays/SetAllTest.java fails to compile due to recent compiler changes

Summary: Use explicit lambda due to javac simplfying rules for overload resolution with implicit lambdas
Reviewed-by: alanb, mduigou
上级 f5fa3f45
...@@ -167,13 +167,13 @@ public class SetAllTest { ...@@ -167,13 +167,13 @@ public class SetAllTest {
public void testStringSetNulls() { public void testStringSetNulls() {
String[] ar = new String[2]; String[] ar = new String[2];
try { try {
Arrays.setAll(null, i -> "X"); Arrays.setAll(null, (IntFunction<String>) i -> "X");
fail("Arrays.setAll(null, foo) should throw NPE"); fail("Arrays.setAll(null, foo) should throw NPE");
} catch (NullPointerException npe) { } catch (NullPointerException npe) {
// expected // expected
} }
try { try {
Arrays.parallelSetAll(null, i -> "X"); Arrays.parallelSetAll(null, (IntFunction<String>) i -> "X");
fail("Arrays.parallelSetAll(null, foo) should throw NPE"); fail("Arrays.parallelSetAll(null, foo) should throw NPE");
} catch (NullPointerException npe) { } catch (NullPointerException npe) {
// expected // expected
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册