Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43511

NPE when getting params object with a null parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None

      If you've got a null parameter value, and you try to do cpsScript.getProperty("params"), you get the following:

      java.lang.NullPointerException
      at org.jenkinsci.plugins.workflow.cps.persistence.IteratorHack.writeReplace(IteratorHack.java:52)
      at org.jenkinsci.plugins.workflow.cps.ParamsVariable.addValue(ParamsVariable.java:88)
      at org.jenkinsci.plugins.workflow.cps.ParamsVariable.getValue(ParamsVariable.java:75)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:121)
      ...

      So that's not ideal. =)

            Unassigned Unassigned
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: