JDK-8029153 : [TESTBUG] test/compiler/7141637/SpreadNullArg.java fails because it expects NullPointerException
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2013-11-26
  • Updated: 2014-10-14
  • Resolved: 2013-12-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 JDK 9 Other
7u71Fixed 8Fixed 9Fixed hs25Fixed
Related Reports
Duplicate :  
Relates :  
Description
The fix for JDK-8001109 changed the exception being thrown in the case of a wrong array length being passed in but the test for JDK-7141637 wasn't adapted.

The suggested fix is:

diff -r c302ab46defe test/compiler/7141637/SpreadNullArg.java
--- a/test/compiler/7141637/SpreadNullArg.java	Mon Nov 25 18:40:26 2013 -0800
+++ b/test/compiler/7141637/SpreadNullArg.java	Mon Nov 25 22:07:41 2013 -0800
@@ -46,9 +46,9 @@ 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) {
+    } catch (IllegalArgumentException e) {
       // Expected exception - do nothing!
-    } catch(Throwable e) {
+    } catch (Throwable e) {
       throw new Error(e);
     }
 

Comments
Release team: Approved for fixing
06-12-2013