Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#511]

  • Loading branch information...
commit 0888362649b96afa7c2c09b5106bf543547e9c8a 1 parent 7e6b1aa
@pepite pepite authored
View
15 framework/src/play/mvc/results/RenderJson.java
@@ -48,12 +48,17 @@ public void apply(Request request, Response response) {
}
//
- static Method getMethod(Class<?> clazz, String name) {
- for (Method m : clazz.getDeclaredMethods()) {
- if (m.getName().equals(name) && !m.isBridge()) {
- return m;
+ static Method getMethod(Class clazz, String methodName) {
+ Method bestMatch = null;
+ for(Method m : clazz.getDeclaredMethods()) {
+ if (m.getName().equals(methodName) && !m.isBridge()) {
+ if (bestMatch == null || !Object.class.equals(m.getParameterTypes()[0])) {
+ bestMatch = m;
+ }
}
}
- return null;
+ return bestMatch;
}
+
+
}
View
4 samples-and-tests/yabe/app/controllers/Security.java
@@ -4,8 +4,8 @@
public class Security extends Secure.Security {
- static boolean authentify(String username, String password) {
- return User.connect(username, password) != null;
+ static boolean authentify(String email, String password) {
+ return User.connect(email, password) != null;
}
static boolean check(String profile) {
Please sign in to comment.
Something went wrong with that request. Please try again.