sbglasius commented on code in PR #15525:
URL: https://github.com/apache/grails-core/pull/15525#discussion_r2981923587
##########
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/AbstractGrailsControllerUrlMappings.groovy:
##########
@@ -45,16 +47,20 @@ import org.grails.web.servlet.mvc.GrailsWebRequest
* @since 3.0
*/
@CompileStatic
+@Slf4j
abstract class AbstractGrailsControllerUrlMappings implements UrlMappings {
UrlMappings urlMappingsHolderDelegate
UrlConverter urlConverter
+ boolean validateWildcardMappings
ConcurrentHashMap<ControllerKey, GrailsControllerClass>
mappingsToGrailsControllerMap = new ConcurrentHashMap<>()
ConcurrentHashMap<ControllerKey, GrailsControllerClass> deferredMappings =
new ConcurrentHashMap<>()
AbstractGrailsControllerUrlMappings(GrailsApplication grailsApplication,
UrlMappings urlMappingsHolderDelegate, UrlConverter urlConverter = null) {
this.urlMappingsHolderDelegate = urlMappingsHolderDelegate
this.urlConverter = urlConverter
+ this.validateWildcardMappings = grailsApplication?.config?.getProperty(
+ Settings.WEB_URL_MAPPING_VALIDATE_WILDCARDS, Boolean, true) ?:
true
def controllerArtefacts =
grailsApplication.getArtefacts(ControllerArtefactHandler.TYPE)
Review Comment:
Since right here `grailsApplication` is not safe referenced.
##########
grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/AbstractGrailsControllerUrlMappings.groovy:
##########
@@ -45,16 +47,20 @@ import org.grails.web.servlet.mvc.GrailsWebRequest
* @since 3.0
*/
@CompileStatic
+@Slf4j
abstract class AbstractGrailsControllerUrlMappings implements UrlMappings {
UrlMappings urlMappingsHolderDelegate
UrlConverter urlConverter
+ boolean validateWildcardMappings
ConcurrentHashMap<ControllerKey, GrailsControllerClass>
mappingsToGrailsControllerMap = new ConcurrentHashMap<>()
ConcurrentHashMap<ControllerKey, GrailsControllerClass> deferredMappings =
new ConcurrentHashMap<>()
AbstractGrailsControllerUrlMappings(GrailsApplication grailsApplication,
UrlMappings urlMappingsHolderDelegate, UrlConverter urlConverter = null) {
this.urlMappingsHolderDelegate = urlMappingsHolderDelegate
this.urlConverter = urlConverter
+ this.validateWildcardMappings = grailsApplication?.config?.getProperty(
Review Comment:
Why would `grailsApplication` be `null`? or `config` for that matter? Except
perhaps when testing?
--
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]