codeconsole opened a new pull request, #15746: URL: https://github.com/apache/grails-core/pull/15746
## Summary Follow-up to #15713 addressing review feedback on `RenderSitemeshTagLib`: > To make this faster, you should use the method version instead of closure. Converts the seven closure-based tags in `RenderSitemeshTagLib` — `applyLayout`, `pageProperty`, `ifPageProperty`, `layoutTitle`, `layoutHead`, `layoutBody`, and `content` — to method handlers, so GSP dispatch uses the faster reflective method-invocation path introduced in #15465 instead of cloning a closure on every tag invocation. This also clears the closure-based-tag deprecation warning the #15465 compiler check emits for this class. ## Behavior preservation Only the seven tag declarations change; the tag bodies are untouched. GSP dispatch (`TagOutput.captureTagOutput`) already passes `TagOutput.EMPTY_BODY_CLOSURE` (never `null`) as the body to two-argument tags, so the existing `body` / `body instanceof Closure` checks resolve identically whether each tag is a closure field or a method. The closure and method paths share the same output-stack setup, so `out` resolution is unchanged. ## Scope `Sitemesh3LayoutTagLib` is intentionally left as closures, matching its SiteMesh 2 twin `GrailsLayoutTagLib`: those `grailsLayout`-namespace, `@CompileStatic` capture tags are driven by `GrailsLayoutPreprocessor` and were deliberately kept as closures in #15465. ## Tests - Adds `RenderSitemeshTagLibSpec`, which verifies via the framework `TagMethodInvoker` API that all seven tags are discovered as invokable method handlers and no longer exist as closure fields. - Existing end-to-end coverage in `grails-test-examples/gsp-sitemesh3` (`EndToEndSpec`) continues to exercise the runtime behavior of these tags. ## Validation - `./gradlew :grails-sitemesh3:test` — green - `./gradlew :grails-sitemesh3:checkstyleMain :grails-sitemesh3:codenarcMain` — green -- 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]
