jdaugherty commented on code in PR #15721:
URL: https://github.com/apache/grails-core/pull/15721#discussion_r3403903558


##########
grails-domain-class/src/main/groovy/org/grails/plugins/domain/support/DefaultConstraintEvaluatorFactoryBean.groovy:
##########
@@ -50,7 +51,10 @@ class DefaultConstraintEvaluatorFactoryBean implements 
FactoryBean<ConstraintsEv
     ConstraintsEvaluator getObject() throws Exception {
         ConstraintRegistry registry = new 
DefaultConstraintRegistry(messageSource)
 
-        new DefaultConstraintEvaluator(registry, 
grailsDomainClassMappingContext, 
ConstraintEvalUtils.getDefaultConstraints(grailsApplication.config))
+        boolean cacheAutoTimestampAnnotations = 
grailsApplication.config.getProperty(Settings.SETTING_AUTO_TIMESTAMP_CACHE_ANNOTATIONS,
 Boolean, true)
+        boolean defaultNullable = 
grailsApplication.config.getProperty(Settings.SETTING_DEFAULT_NULLABLE, 
Boolean, true)
+        new DefaultConstraintEvaluator(registry, 
grailsDomainClassMappingContext,
+                
ConstraintEvalUtils.getDefaultConstraints(grailsApplication.config), 
cacheAutoTimestampAnnotations, defaultNullable)

Review Comment:
   Why aren't we setting these defaults inside of getDefaultConstraints?  You 
already have the config, it seems odd to pass them into it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to