matrei commented on PR #16396: URL: https://github.com/apache/grails-core/pull/16396#issuecomment-5847693589
One more thing, about the target branch. This bug is also on `7.0.x`. All five unchecked `(GrailsWebRequest) RequestContextHolder.getRequestAttributes()` casts are there (`AbstractUrlMappingInfo:124`, `DefaultUrlMappingInfo:203`, `DefaultUrlCreator:64` and `:127`, `RegexUrlMapping:302`), and `GrailsExceptionResolver` still configures the forward with `WebUtils.retrieveGrailsWebRequest()`. So a 7.x application tested with `MockMvc` loses the original exception in the same way. It's a bug fix with no API change, so it qualifies for `7.0.x`. However, it can't just be retargeted. Applying `0f09606b2c` and `912be076d0` to `origin/7.0.x` conflicts in `GrailsExceptionResolver`, `GrailsExceptionResolverSpec`, `AbstractUrlMappingInfo` and `DefaultUrlMappingInfo`. The resolver change builds on code that only exists on `8.0.x`: the guard against forwarding to a failing error handler twice, the captured-name handling and the status-code selection. On `7.0.x` that part would need to be rewritten. That leaves two options: 1. Retarget this PR to `7.0.x`, rework the fix for the older code, and reconcile it with the `8.0.x` version during the merge-up. 2. Merge this PR on `8.0.x` once the items above are addressed, and open a separate backport PR for `7.0.x` that adapts the fix to the older resolver. I lean toward 2, since most of the rework would be in the resolver changes. @jdaugherty, since those are your changes, which do you prefer? -- 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]
