File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
grails-core/src/main/groovy/grails/boot
grails-plugin-validation/src/main/groovy/grails/validation Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,14 @@ class GrailsApp extends SpringApplication {
145145 def projectPaths = binding. getVariables(). get(' projectPaths' )
146146 if (projectPaths) {
147147 for (path in projectPaths) {
148- watchBaseDirectories << new File (parentDir, path. toString())
148+ if (path) {
149+
150+ def pathStr = path. toString()
151+ if (pathStr. startsWith(' :' )) {
152+ pathStr = pathStr. substring(1 )
153+ }
154+ watchBaseDirectories << new File (parentDir, pathStr)
155+ }
149156 }
150157 }
151158 }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ trait Validateable {
7171 static Map<String , ConstrainedProperty > getConstraintsMap() {
7272 if (this . constraintsMapInternal == null ) {
7373 ConstraintsEvaluator evaluator = findConstraintsEvaluator()
74- this . constraintsMapInternal = evaluator. evaluate this , defaultNullable()
74+ def evaluatedConstraints = evaluator. evaluate( this , defaultNullable() )
7575
7676 if (! defaultNullable()) {
7777 def methods = this . getDeclaredMethods()
@@ -84,14 +84,15 @@ trait Validateable {
8484 if (isPropertyGetter(method)) {
8585 def propertyName = NameUtils . getPropertyNameForGetterOrSetter(method. name)
8686 if ( ! ignoredProperties. contains(propertyName) &&
87- ! this . constraintsMapInternal . containsKey(propertyName)) {
87+ ! evaluatedConstraints . containsKey(propertyName)) {
8888 def cp = new ConstrainedProperty (this , propertyName, method. returnType)
8989 cp. applyConstraint ' nullable' , false
90- this . constraintsMapInternal . put propertyName, cp
90+ evaluatedConstraints . put propertyName, cp
9191 }
9292 }
9393 }
9494 }
95+ this . constraintsMapInternal = evaluatedConstraints
9596 }
9697 this . constraintsMapInternal
9798 }
You can’t perform that action at this time.
0 commit comments