jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-29628] createVariableResolver() is called with null as a parameter
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
createVariableResolver() method in FilterScript.java (97) is called with null as a parameter instead of build instance.
final String value = pv.createVariableResolver(null).resolve(name);
This is against specification
http://javadoc.jenkins-ci.org/hudson/model/ParameterValue.html#createVariableResolver(hudson.model.AbstractBuild)
where we can read that:
build - The build for which this parameter is being used. Never null.
This null is causing other plugins to fail. For example:
https://issues.jenkins-ci.org/browse/JENKINS-29539
---
Originally reported by zuljin, imported from: createVariableResolver() is called with null as a parameter
kohsuke
Raw content of original issue
createVariableResolver() method in FilterScript.java (97) is called with null as a parameter instead of build instance.
final String value = pv.createVariableResolver(null).resolve(name);This is against specification
http://javadoc.jenkins-ci.org/hudson/model/ParameterValue.html#createVariableResolver(hudson.model.AbstractBuild)
where we can read that:
build - The build for which this parameter is being used. Never null.This null is causing other plugins to fail. For example:
https://issues.jenkins-ci.org/browse/JENKINS-29539
Contributor guide
Research direction
Start in FilterScript.java at the createVariableResolver(null) call shown in the issue, then inspect how the build instance is available in that code path. Compare the call with the ParameterValue.createVariableResolver specification and verify the affected variable-resolution scenario no longer receives null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100