Directive Generator produces NPE with `when --> allOf --> (nothing else)`

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Summary
      When using the Directive Generator, building a when / allOf directive with no conditions attached produces a NPE. This was another accidental find.

      Steps to recreate
      1. Go to the Declarative Directive Generator via http://1.2.3.4:8080/job/your-pipeline-job/directive-generator/

      2. Set it up as follows:

      • Sample Directive: when
      • whenCondition: allOf
      • Execute the stage if all nested conditions are true: no selections made

      3. And press the Generate Declarative Directive button, you'll get a NPE in your sample:

      when {
        // ERROR TRANSLATING CONDITIONAL: java.lang.NullPointerException
      }
      

      Accidental find.

            Assignee:
            Andrew Bayer
            Reporter:
            Karl Shultz
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: