mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-23 12:32:13 +00:00
SEC-154: Support Hibernate/CGLIB modified domain objects.
This commit is contained in:
parent
9766ee1cbe
commit
4024f124b9
@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2004, 2005 Acegi Technology Pty Limited
|
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
package org.acegisecurity.acl.basic;
|
package org.acegisecurity.acl.basic;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.ClassUtils;
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
@ -64,7 +66,10 @@ public class NamedEntityObjectIdentity implements AclObjectIdentity {
|
|||||||
throws IllegalAccessException, InvocationTargetException {
|
throws IllegalAccessException, InvocationTargetException {
|
||||||
Assert.notNull(object, "object cannot be null");
|
Assert.notNull(object, "object cannot be null");
|
||||||
|
|
||||||
this.classname = object.getClass().getName();
|
this.classname = (object.getClass().getPackage() == null)
|
||||||
|
? ClassUtils.getShortClassName(object.getClass())
|
||||||
|
: (object.getClass().getPackage().getName() + "."
|
||||||
|
+ ClassUtils.getShortClassName(object.getClass()));
|
||||||
|
|
||||||
Class clazz = object.getClass();
|
Class clazz = object.getClass();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user