File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
grails-plugin-validation/src/main/groovy/grails/validation/trait Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ trait Validateable {
6363 if (this . constraintsMapInternal == null ) {
6464 BeanFactory ctx = Holders . applicationContext
6565 ConstraintsEvaluator evaluator = ctx. getBean(ConstraintsEvaluator . BEAN_NAME , ConstraintsEvaluator )
66- this . constraintsMapInternal = evaluator. evaluate this , defaultNullable()
66+ def evaluatedConstraints = evaluator. evaluate( this , defaultNullable() )
6767
6868 if (! defaultNullable()) {
6969 def methods = this . getDeclaredMethods()
@@ -74,15 +74,16 @@ trait Validateable {
7474 def propertyName = GrailsNameUtils . getPropertyName(methodName[3 .. -1 ])
7575 if (propertyName != ' metaClass' &&
7676 propertyName != ' errors' &&
77- ! this . constraintsMapInternal . containsKey(propertyName)) {
77+ ! evaluatedConstraints . containsKey(propertyName)) {
7878 def cp = new ConstrainedProperty (this , propertyName, method. returnType)
7979 cp. applyConstraint ' nullable' , false
80- this . constraintsMapInternal . put propertyName, cp
80+ evaluatedConstraints . put propertyName, cp
8181 }
8282 }
8383 }
8484 }
8585 }
86+ this . constraintsMapInternal = evaluatedConstraints
8687 }
8788 this . constraintsMapInternal
8889 }
You can’t perform that action at this time.
0 commit comments