Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gboissinot committed Apr 24, 2012
1 parent 09b109c commit 7581143
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/org/jenkinsci/plugins/envinject/EnvInjectAction.java
Expand Up @@ -61,10 +61,20 @@ public Object getTarget() {

@SuppressWarnings("unused")
private Object writeReplace() throws ObjectStreamException {

if (envMap == null) {
return this;
}

if (envMap.size() == 0) {
return this;
}

try {
EnvInjectSaveable dao = new EnvInjectSaveable();
if (rootDir == null) {
dao.saveEnvironment(build.getRootDir(), envMap);
return this;
}
dao.saveEnvironment(rootDir, envMap);
} catch (EnvInjectException e) {
Expand Down

0 comments on commit 7581143

Please sign in to comment.