Skip to content

Commit 5101457

Browse files
committed
Merge branch '3.0.x'
2 parents 4d53cd2 + 4aa4705 commit 5101457

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

grails-core/src/main/groovy/grails/boot/GrailsApp.groovy

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

grails-plugin-validation/src/main/groovy/grails/validation/Validateable.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)