Skip to content

Commit

Permalink
using ClassUtils instead of AopUtils since there's no need to support…
Browse files Browse the repository at this point in the history
… older Spring versions
  • Loading branch information
burtbeckwith committed Dec 20, 2015
1 parent 698eb8d commit 653bc98
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package grails.plugin.springsecurity.acl.util

import groovy.transform.CompileStatic
import org.springframework.aop.support.AopUtils
import org.springframework.util.ClassUtils
import org.springframework.util.ReflectionUtils

import java.lang.reflect.Constructor
Expand Down Expand Up @@ -94,16 +94,10 @@ class ProxyUtils {
}

protected static boolean isJavassistProxy(Class<?> clazz) {
for (Class<?> i in clazz.interfaces) {
if (i.name.contains('org.hibernate.proxy.HibernateProxy')) {
return true
}
}
return false
clazz.interfaces.any { Class<?> c -> c.name.contains('org.hibernate.proxy.HibernateProxy') }
}

@SuppressWarnings('deprecation') // needs to work in Spring 3.1 and earlier
private static boolean isCglibProxyClass(Class<?> clazz) {
AopUtils.isCglibProxyClass clazz
protected static boolean isCglibProxyClass(Class<?> clazz) {
ClassUtils.isCglibProxyClass clazz
}
}

0 comments on commit 653bc98

Please sign in to comment.