Permalink
Browse files

Add a protection against not using constant(…) while specifying a con…

…troller method's arguments
  • Loading branch information...
jawher committed Jul 27, 2012
1 parent ae74acd commit 2acd6cb1af0346e39a10f84add132293a9365a6d
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/vinna/route/RouteBuilder.java
@@ -51,6 +51,9 @@ public Object invoke(Object self, Method thisMethod, Method proceed, Object[] ar
System.err.println(thisMethod + ":" + thisMethod.getReturnType());
if (method == null) {
if (Outcome.class.isAssignableFrom(thisMethod.getReturnType())) {
+ if(parameters.size()!=args.length) {
+ throw new IllegalStateException("Like, really ?");
+ }
method = thisMethod;
context.addRoute(createRoute());
} else {

0 comments on commit 2acd6cb

Please sign in to comment.