From 337155f0eafae03e6190505628195f4db123469b Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Sat, 5 Apr 2008 02:46:27 +0000 Subject: [PATCH] SEC-602: Retrieve true underlaying class, properly handling CGLIB enhanced versions. --- .../security/acls/objectidentity/ObjectIdentityImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acl/src/main/java/org/springframework/security/acls/objectidentity/ObjectIdentityImpl.java b/acl/src/main/java/org/springframework/security/acls/objectidentity/ObjectIdentityImpl.java index c33570d257..00d43a8ae1 100644 --- a/acl/src/main/java/org/springframework/security/acls/objectidentity/ObjectIdentityImpl.java +++ b/acl/src/main/java/org/springframework/security/acls/objectidentity/ObjectIdentityImpl.java @@ -17,6 +17,7 @@ package org.springframework.security.acls.objectidentity; import org.springframework.security.acls.IdentityUnavailableException; import org.springframework.util.Assert; +import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; import java.io.Serializable; @@ -75,7 +76,7 @@ public class ObjectIdentityImpl implements ObjectIdentity { public ObjectIdentityImpl(Object object) throws IdentityUnavailableException { Assert.notNull(object, "object cannot be null"); - this.javaType = object.getClass(); + this.javaType = ClassUtils.getUserClass(object.getClass()); Object result;