提交 de53f6db 编写于 作者: I iignatyev

8029153: [TESTBUG] test/compiler/7141637/SpreadNullArg.java fails because it...

8029153: [TESTBUG] test/compiler/7141637/SpreadNullArg.java fails because it expects NullPointerException
Reviewed-by: twisti
上级 47571101
...@@ -46,13 +46,17 @@ public class SpreadNullArg { ...@@ -46,13 +46,17 @@ public class SpreadNullArg {
mh_spread_target = mh_spread_target =
MethodHandles.lookup().findStatic(SpreadNullArg.class, "target_spread_arg", mt_ref_arg); MethodHandles.lookup().findStatic(SpreadNullArg.class, "target_spread_arg", mt_ref_arg);
result = (int) mh_spreadInvoker.invokeExact(mh_spread_target, (Object[]) null); result = (int) mh_spreadInvoker.invokeExact(mh_spread_target, (Object[]) null);
} catch(NullPointerException e) { throw new Error("Expected IllegalArgumentException was not thrown");
// Expected exception - do nothing! } catch (IllegalArgumentException e) {
} catch(Throwable e) { System.out.println("Expected exception : " + e);
} catch (Throwable e) {
throw new Error(e); throw new Error(e);
} }
if (result != 42) throw new Error("Expected NullPointerException was not thrown"); if (result != 42) {
throw new Error("result [" + result
+ "] != 42 : Expected IllegalArgumentException was not thrown?");
}
} }
public static int target_spread_arg(Integer i1) { public static int target_spread_arg(Integer i1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册