Skip to content
Permalink
Browse files

[FIX JENKINS-27496] reconfigure may return null

  • Loading branch information...
ndeloof committed Mar 18, 2015
1 parent c415857 commit e5e3143c50f01e77aa901855423ed2914b0f3c1f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/org/jenkinsci/plugins/envinject/EnvInjectJobProperty.java
@@ -88,7 +88,7 @@ public boolean isOverrideBuildParameters() {
EnvInjectJobPropertyContributor[] contributorsInstance = envInjectContributorManagement.getNewContributorsInstance();

//No jobProperty Contributors ==> new configuration
if (contributors == null || contributors.length == 0) {
if (contributors == null || contributors.lerength == 0) {
return contributorsInstance;
}

@@ -132,7 +132,7 @@ public void setContributors(EnvInjectJobPropertyContributor[] jobPropertyContrib
@Override
public JobProperty<?> reconfigure(StaplerRequest req, JSONObject form) throws Descriptor.FormException {
EnvInjectJobProperty property = (EnvInjectJobProperty) super.reconfigure(req, form);
if (property.info != null && !Jenkins.getInstance().hasPermission(Jenkins.RUN_SCRIPTS)) {
if (property != null && property.info != null && !Jenkins.getInstance().hasPermission(Jenkins.RUN_SCRIPTS)) {
// Don't let non RUN_SCRIPT users set arbitrary groovy script
property.info = new EnvInjectJobPropertyInfo(property.info.propertiesFilePath, property.info.propertiesContent,
property.info.getScriptFilePath(), property.info.getScriptContent(),

0 comments on commit e5e3143

Please sign in to comment.
You can’t perform that action at this time.