Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-47202] Switch to HashMaps for env to fix serialization
TreeMap#Entry isn't serializable, which can bite you in the weirdest places. Like here - if `environment` variable values end up triggering a program save, tada, you get a `NotSerializableException`. Which is bad. I can't reproduce this consistently - maybe 3 times out of 4, it'll fail. But this fix has yet to reproduce the error after 20+ attempts, so I think it's good.
- Loading branch information
Showing with 49 additions and 2 deletions.
- +1 −1 ...efinition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Environment.groovy
- +1 −1 ...inition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy
- +9 −0 ...odel-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/EnvironmentTest.java
- +1 −0 pipeline-model-definition/src/test/resources/readFileInEnv-data.txt
- +37 −0 pipeline-model-definition/src/test/resources/readFileInEnv.groovy