Skip to content

Commit

Permalink
[playframework#1091] don't repeat logic in Java.invokeChildOrStatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Engel committed Sep 1, 2011
1 parent d286e9f commit 6c2fefb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions modules/secure/app/controllers/Secure.java
Expand Up @@ -182,15 +182,9 @@ static void onCheckFailed(String profile) {
}

private static Object invoke(String m, Object... args) throws Throwable {
Class security = null;
List<Class> classes = Play.classloader.getAssignableClasses(Security.class);
if(classes.size() == 0) {
security = Security.class;
} else {
security = classes.get(0);
}

try {
return Java.invokeStaticOrParent(security, m, args);
return Java.invokeChildOrStatic(Security.class, m, args);
} catch(InvocationTargetException e) {
throw e.getTargetException();
}
Expand Down

0 comments on commit 6c2fefb

Please sign in to comment.