caelum/vraptor — pull request #478 by nykolaslima (2012-11-13 23:40:52+00:00)
Title: linkTo support to overloaded methods

The problemn is related here: http://www.guj.com.br/java/281823-vraptor-linkto-com-dois-metodos-de-mesmo-nome-no-controller-bug

@lucascs, the code works but when we have a method as below it breaks:
Controller

@Post("/method/{entity.id}")
public void method(SomeModel someModel)

JSP

${linkTo[SubGenericController].method[entityId]}

This breaks because linkToHandler tries to find a method named "method" with an Integer parameter. The parameter's type verification is necessary to differentiate the overloaded methods.

How can we deal with it?
When parameter's type dont match can we return the method with same parameter's number but with no match types or the first matching method?