SwitchBoostraps.enumSwitch does not throw an NPE when lookup is null in some cases

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • 27
    • Affects Version/s: 25, 26, 27
    • Component/s: tools
    • None

      Consider this testscase:
      ---
              enum E {}
              try {
                  MethodType switchType = MethodType.methodType(int.class, E.class, int.class);
                  BSM_ENUM_SWITCH.invoke(null, "", switchType,
                                         new Object[] {"A"});
                  fail("Didn't get the expected exception.");
              } catch (NullPointerException ex) {
                  //OK
              }
      ---

            Assignee:
            Jan Lahoda
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: