mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-07 00:48:38 +00:00
8029153: [TESTBUG] test/compiler/7141637/SpreadNullArg.java fails because it expects NullPointerException
Reviewed-by: twisti
This commit is contained in:
parent
5e69eb1595
commit
6780ffeaa6
@ -46,13 +46,17 @@ public class SpreadNullArg {
|
||||
mh_spread_target =
|
||||
MethodHandles.lookup().findStatic(SpreadNullArg.class, "target_spread_arg", mt_ref_arg);
|
||||
result = (int) mh_spreadInvoker.invokeExact(mh_spread_target, (Object[]) null);
|
||||
} catch(NullPointerException e) {
|
||||
// Expected exception - do nothing!
|
||||
} catch(Throwable e) {
|
||||
throw new Error("Expected IllegalArgumentException was not thrown");
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.out.println("Expected exception : " + e);
|
||||
} catch (Throwable 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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user