The GitHub Actions job "CI" on 
grails-core.git/fix/16129-grailswebrequest-cast-7.0.x has failed.
Run started by GitHub user jdaugherty (triggered by jdaugherty).

Head commit for run:
93c07c7eeb1322f06d689ab97bd2b36e20dadc5d / James Daugherty 
<[email protected]>
Resolve error handlers and mapping names without a bound GrailsWebRequest

Backport of #16396 to 7.0.x.

A DispatcherServlet other than the Grails one - the one MockMvc runs, for
example - binds a plain ServletRequestAttributes over the GrailsWebRequest
that GrailsWebRequestFilter bound. The casts to GrailsWebRequest in the URL
mapping layer then threw a ClassCastException, which GrailsExceptionResolver
reported in place of the exception it was resolving.

- URL mapping names, the names a mapping captures from the URI ($controller,
  $action, ...), reverse mappings and the default URL creator find the
  GrailsWebRequest the filter stored on the request when the bound
  attributes are plain
- Without one, a name closure is not called and resolves to null, and a map
  of HTTP methods is keyed by the method of the bound request. With no
  attributes bound at all, a closure is still called without a delegate
- GrailsExceptionResolver forwards to a controller error handler only when
  the request has a GrailsWebRequest, and an error handler that cannot be
  resolved no longer replaces the exception being resolved: it is logged
  and the /error view renders the original exception
- The default URL creator no longer prefixes URLs with "null" when there is
  no context path

Fixes #16129

Co-authored-by: ruthes00 <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/36472983634

With regards,
GitHub Actions via GitBox

Reply via email to