Skip to content
Browse files
[JENKINS-37781] Fixed empty when validation
  • Loading branch information
rsandell committed Oct 27, 2016
1 parent 819bbdf commit eddf70b8c5747b8c516752e8c033891b6cfc9daa
Showing 1 changed file with 1 addition and 1 deletion.
@@ -194,7 +194,7 @@ class ModelValidatorImpl implements ModelValidator {

public boolean validateElement(ModelASTWhen when) {
//TODO can we evaluate if the closure will return something that can be tries for true?
if (when.toGroovy() =~ /when\s[{\s}]*/) {
if (when.toGroovy() =~ /\Awhen\s[{\s}]*\z/) {
errorCollector.error(when, "Empty when closure, remove the property or add some content.")
return false

0 comments on commit eddf70b

Please sign in to comment.