Repository navigation
Conversation
Groovy 6.0.0 generated no @DeleGate methods returning a nested class of a Java source in the same joint compilation (GROOVY-12426). The render methods of GrailsJsonViewHelper return JsonOutput.JsonWritable, so the interface declared them as default methods and TemplateRenderer forwarded them itself. Groovy 6.0.1 fixes it, so both files are back to their 8.0.x form: the render methods are abstract again and @DeleGate forwards them. A new TemplateRendererSpec feature calls each of them through the renderer.
This was referenced Nov 30, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #17231 (Groovy 6.0.1). Groovy 6.0.1 fixes GROOVY-12426, so this PR removes the JSON views workaround for it. The defect was that Groovy 6.0.0 generated no
@Delegatemethods returning a nested class of a Java source in the same joint compilation. Therendermethods ofGrailsJsonViewHelperreturnJsonOutput.JsonWritable, a nested class of the JavaJsonOutput. So the workaround declared them asdefaultmethods that throwUnsupportedOperationException, andTemplateRendererforwarded them itself.Both files are back to their
8.0.xform: therendermethods are abstract again, and@Delegateforwards them. A newTemplateRendererSpecfeature calls each of the fiverendermethods through the renderer and checks that it reaches the helper and returns its result.This PR is stacked on #17231. Its base is the branch of #17231, so the diff shows only this change. Once #17231 is merged, retarget it to
9.0.x.The other workarounds whose Groovy defects 6.0.1 fixes, for GROOVY-12427 and GROOVY-12434, also exist on 8.0.x. Their removal is in #17232 and reaches 9.0.x through the merge-up.
Verification
On this branch, with Groovy 6.0.1:
:grails-views-gson:checkpasses: 285 tests, no failures, and no Checkstyle or CodeNarc violations../gradlew cleanViolationReports aggregateViolations --continuefinds no Checkstyle, CodeNarc, PMD, RAT or repository-convention violations.With the commit of #17232 cherry-picked on top:
./gradlew build -PskipTestspasses. That build compiles the JSON views of every test application.views-functional-tests(60) andissue-views-182(1) pass.grails-validation(93),grails-test-suite-uber(643),grails-test-suite-web(3,442) andgrails-views-gson(285).