playframework/Play20 — pull request #304 by julienrf (2012-05-12 20:11:14+00:00)
Title: Routes parameters unboxing

Fixes [#282](https://play.lighthouseapp.com/projects/82401/tickets/282-unboxing-in-route-parameters-fails-silently)

The problem came from the fact that `Class#getMethod` doesn’t do unboxing, so a `NoSuchElementException` was thrown when one wrote a route calling an action `foo(n: Long)` if this action was defined as `public static Result foo(long n)`.

I used `MethodUtils.getMatchingAccessibleMethod`) to solve the problem.

See the following references for more information:
http://stackoverflow.com/questions/1894740/any-solution-for-class-getmethod-reflection-and-autoboxing
http://commons.apache.org/lang/api-3.1/org/apache/commons/lang3/reflect/MethodUtils.html#getMatchingAccessibleMethod(java.lang.Class,%20java.lang.String,%20java.lang.Class...)

I tested with long, int and doubles. Let me know if you think I should add a test to the pull request.