Skip to content

Commit

Permalink
Fix ReverseRoutes NPE if controller is interface and no parameters #239
Browse files Browse the repository at this point in the history
  • Loading branch information
eskatos committed Jan 24, 2015
1 parent aaec675 commit c102198
Showing 1 changed file with 11 additions and 4 deletions.
Expand Up @@ -210,10 +210,17 @@ public Object invoke( Object proxy, java.lang.reflect.Method controllerMethod, O
throws Throwable
{
methodName = controllerMethod.getName();
paramsTypes = Arrays.stream( args )
.map( obj -> obj.getClass() )
.collect( Collectors.toList() )
.toArray( new Class<?>[ 0 ] );
if( args == null || args.length == 0 )
{
paramsTypes = new Class<?>[ 0 ];
}
else
{
paramsTypes = Arrays.stream( args )
.map( obj -> obj.getClass() )
.collect( Collectors.toList() )
.toArray( new Class<?>[ 0 ] );
}
paramsValues = args;
return null;
}
Expand Down

0 comments on commit c102198

Please sign in to comment.