Skip to content

Commit

Permalink
Add null safe call on method object in case the method for the curren…
Browse files Browse the repository at this point in the history
…t action does not exist (eg scaffolding = true on Controller).

git-svn-id: http://ala.googlecode.com/svn/trunk/ala-web-theme@249 cf76a52e-83f7-1f8e-e3a8-b8364d34af1a
  • Loading branch information
sbearcsiro committed Jul 7, 2014
1 parent ce535ca commit 920a3d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grails-app/conf/au/org/ala/web/AlaSecuredFilters.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AlaSecuredFilters {
Method method = cClazz.getMethods().find { method -> method.name == methodName && Modifier.isPublic(method.getModifiers()) }

AlaSecured ca = cClazz.getAnnotation(AlaSecured)
AlaSecured ma = method.getAnnotation(AlaSecured)
AlaSecured ma = method?.getAnnotation(AlaSecured)
AlaSecured sa = ma ?: ca
if (sa) {

Expand Down

0 comments on commit 920a3d8

Please sign in to comment.