Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8029153

[TESTBUG] test/compiler/7141637/SpreadNullArg.java fails because it expects NullPointerException

    Details

    • Subcomponent:
    • Resolved In Build:
      b63
    • CPU:
      generic
    • OS:
      generic

      Backports

        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);
             }
         

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iignatyev Igor Ignatyev
                  Reporter:
                  twisti Christian Thalinger
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: