Permalink
Browse files

GRAILS-5767 - the json and rico builders are coded to throw IllegalAr…

…gumentException when invalid methods are invoked in builder code. with Groovy 1.6 an InvokerInvocationException was being thrown from the reflection API. With Groovy 1.7 the IllegalArgumentException thrown by the builders is showing up, which I think is the right thing, pending confirmation.
  • Loading branch information...
1 parent 7f59d92 commit c28cdc261e13ec72cf152b2383cfcf1db45b2e6f @jeffbrown jeffbrown committed Feb 10, 2010
@@ -61,14 +61,14 @@ public void testOpenRicoBuilderElement() throws Exception {
try {
parse("json{ message( \"Hello World\" ){ item() } }");
fail();
- } catch (InvokerInvocationException e) {
+ } catch (IllegalArgumentException e) {
// expected
}
try {
parse("json{ message( \"Hello World\" ){ item(\"test\") } }");
fail();
- } catch (InvokerInvocationException e) {
+ } catch (IllegalArgumentException e) {
// expected
}
@@ -78,14 +78,14 @@ public void testOpenRicoBuilderElement() throws Exception {
try {
parse("ajax{ test(id:\"test\") { } }");
fail();
- } catch (InvokerInvocationException e) {
+ } catch (IllegalArgumentException e) {
// expected
}
try {
parse("element{ test(id:\"test\") { } }");
fail();
- } catch (InvokerInvocationException e) {
+ } catch (IllegalArgumentException e) {
// expected
}

0 comments on commit c28cdc2

Please sign in to comment.