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

Impossible to assign null into binding variable in system groovy script

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • groovy-plugin
    • None

      Whenever there is a null value assigned to binding variable (the one without def) it fails with:

      java.lang.NullPointerException
      	at java.util.Hashtable.put(Hashtable.java:514)
      	at groovy.lang.Binding.setVariable(Binding.java:77)
      	at groovy.lang.Script.setProperty(Script.java:66)
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setGroovyObjectProperty(ScriptBytecodeAdapter.java:528)
      	at Script1.run(Script1.groovy:1)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:650)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:636)
      	at hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:87)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)
      	at hudson.model.Run.execute(Run.java:1665)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:246)
      

            olivergondza Oliver Gondža
            olivergondza Oliver Gondža
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: