Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ModelParser.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/ValidatorTest.java pipeline-model-definition/src/test/resources/errors/badPostContent.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bfc38f958d33fa9115fa1d357504f58a8174ec10 Log: [FIXED JENKINS-39799] Properly handle bad content in post blocks.
We actually would have errored out properly-ish if it wasn't for the fact that we ended up with a ModelASTBuildCondition with null condition and null branch, leading to the NPE during compilation. I decided to improve the error messaging and make sure we don't attempt to validate further when condition or branch are null.