Skip to content
Permalink
Browse files

Fix JENKINS-16239

  • Loading branch information
gboissinot committed Jan 27, 2013
1 parent 3e37216 commit 86579126d887aa34fd9964b9fdd258558acc0519
Showing with 9 additions and 4 deletions.
  1. +1 −1 pom.xml
  2. +8 −3 src/main/java/org/jenkinsci/lib/envinject/EnvInjectAction.java
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>1.19</version>
<version>1.29</version>
</parent>

<groupId>org.jenkins-ci.lib</groupId>
@@ -1,6 +1,7 @@
package org.jenkinsci.lib.envinject;

import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Action;
import org.apache.commons.collections.map.UnmodifiableMap;
import org.jenkinsci.lib.envinject.service.EnvInjectSavable;
@@ -36,7 +37,7 @@ public void overrideAll(Map<String, String> all) {
envMap.putAll(all);
}

@SuppressWarnings("unused")
@SuppressWarnings({"unused", "unchecked"})
public Map<String, String> getEnvMap() {
return UnmodifiableMap.decorate(envMap);
}
@@ -46,7 +47,7 @@ public String getIconFileName() {
}

public String getDisplayName() {
return "Injected Environment Variables";
return "Environment Variables";
}

public String getUrlName() {
@@ -83,7 +84,11 @@ private Object readResolve() throws ObjectStreamException {
Map<String, String> resultMap = null;
try {
if (build != null) {
resultMap = dao.getEnvironment(build.getRootDir());
AbstractProject project = build.getProject();
if (project != null) {
File rootDir = new File(project.getRootDir(), build.getId());
resultMap = dao.getEnvironment(rootDir);
}
} else if (rootDir != null) {
resultMap = dao.getEnvironment(rootDir);
}

0 comments on commit 8657912

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