[JIRA] (JENKINS-38167) NPE when using properties from @Field in workflow-cps 2.14

4 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 9:45:01 AM9/13/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-38167
 
Re: NPE when using properties from @Field in workflow-cps 2.14

Caused by changes made for JENKINS-31155.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 9:45:01 AM9/13/16
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / Bug JENKINS-38167
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-cps-plugin
Created: 2016/Sep/13 1:44 PM
Labels: regression
Priority: Critical Critical
Reporter: Jesse Glick

Scripts using @Field instance initializers which referred to properties on the Script such as binding broke as of workflow-cps 2.14 with

groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.NullPointerException
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:430)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:410)
	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:373)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:213)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.cps.CpsScript.$build(CpsScript.java:137)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.$buildNoException(CpsScript.java:148)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.getProperty(CpsScript.java:125)
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
	at WorkflowScript.<init>(WorkflowScript:...)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at java.lang.Class.newInstance(Class.java:442)
	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408)
	... 7 more

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 9:45:01 AM9/13/16
to jenkinsc...@googlegroups.com
Jesse Glick started work on Bug JENKINS-38167
 
Change By: Jesse Glick
Status: Open In Progress

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 9:50:01 AM9/13/16
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Sep 13, 2016, 10:23:02 AM9/13/16
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-38167
 
Re: NPE when using properties from @Field in workflow-cps 2.14

Code changed in jenkins
User: Jesse Glick
Path:
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScript.java
src/test/java/org/jenkinsci/plugins/workflow/cps/CpsScriptTest.java
http://jenkins-ci.org/commit/workflow-cps-plugin/adc9b4cf81be93159f9292b3e0bdbc911da69243
Log:
[FIXED JENKINS-38167] NPE from scripts using @Field with instance initializers loading properties.

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 10:47:02 AM9/13/16
to jenkinsc...@googlegroups.com

haridara@gmail.com (JIRA)

unread,
Aug 29, 2018, 1:25:01 PM8/29/18
to jenkinsc...@googlegroups.com
Hari Dara commented on Bug JENKINS-38167
 
Re: NPE when using properties from @Field in workflow-cps 2.14

When is this fix expected to be released?

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages