Skip to content

Commit

Permalink
[JENKINS-37781] Fixed empty when validation
Browse files Browse the repository at this point in the history
  • Loading branch information
rsandell committed Oct 27, 2016
1 parent 819bbdf commit eddf70b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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
}
Expand Down

0 comments on commit eddf70b

Please sign in to comment.