From fa19052aa4f79ff475bd847d8fcb4a149d594bff Mon Sep 17 00:00:00 2001
From: Rahul Raghavan <rraghavan@openjdk.org>
Date: Sun, 26 Nov 2017 09:05:13 -0800
Subject: [PATCH] 8191313: compiler/runtime/SpreadNullArg.java fails in tier1

Corrected SpreadNullArg.java test to expect NullPointerException after 8157246 fix

Reviewed-by: dcubed, mchung
---
 test/hotspot/jtreg/compiler/runtime/SpreadNullArg.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/hotspot/jtreg/compiler/runtime/SpreadNullArg.java b/test/hotspot/jtreg/compiler/runtime/SpreadNullArg.java
index 826058ed378..800890506d2 100644
--- a/test/hotspot/jtreg/compiler/runtime/SpreadNullArg.java
+++ b/test/hotspot/jtreg/compiler/runtime/SpreadNullArg.java
@@ -49,8 +49,8 @@ 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);
-      throw new Error("Expected IllegalArgumentException was not thrown");
-    } catch (IllegalArgumentException e) {
+      throw new Error("Expected NullPointerException was not thrown");
+    } catch (NullPointerException e) {
       System.out.println("Expected exception : " + e);
     } catch (Throwable e) {
       throw new Error(e);
@@ -58,7 +58,7 @@ public class SpreadNullArg {
 
     if (result != 42) {
       throw new Error("result [" + result
-          + "] != 42 : Expected IllegalArgumentException was not thrown?");
+          + "] != 42 : Expected NullPointerException was not thrown?");
     }
   }