Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.5.2
-
None
-
None
Description
In Grails markup building content such as this:
class HelloController { render(contentType:"text/xml") { helllo("world") } }
Is broken with latest Groovy as it throws a MissingMethodException when calling hello(..). It seems that the closure is now being resolved against the controller which throws a MissingMethodException instead of the builder which is called within the render method like so:
StreamingMarkupBuilder b = new StreamingMarkupBuilder(); Closure callable = (Closure)arguments[arguments.length - 1]; Writable markup = (Writable)b.bind(callable); try { markup.writeTo(out); } catch (IOException e) { throw new ControllerExecutionException("I/O error executing render method for arguments ["+argMap+"]: " + e.getMessage(),e); }
The test that is broken in Grails is the testRenderXml test in this test case: