Skip to content

Commit

Permalink
Revert "Load env vars from disk before saving so they aren't deleted …
Browse files Browse the repository at this point in the history
…if the cached value is wrong"

I think it is better to have onLoad intialize envMap and keep writeReplace the same. This reverts commit dab1c21.
  • Loading branch information
dwnusbaum committed Sep 20, 2017
1 parent dab1c21 commit 01dee1a
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -130,11 +130,8 @@ private Object writeReplace() throws ObjectStreamException {
try {
EnvInjectSavable dao = new EnvInjectSavable();

Map<String, String> toWrite = getEnvMap();
if (toWrite == null) {
toWrite = Collections.<String, String>emptyMap();
}

Map<String, String> toWrite = envMap != null ? envMap : Collections.<String, String>emptyMap();

if (rootDir == null) {
dao.saveEnvironment(build.getRootDir(), Maps.transformEntries(toWrite,
new Maps.EntryTransformer<String, String, String>() {
Expand Down

0 comments on commit 01dee1a

Please sign in to comment.