SEC-1387: Use a transient object as the advice monitor, rather than a Serializable.

No need for an anonymous inner class.
This commit is contained in:
Luke Taylor 2010-02-19 01:02:22 +00:00
parent 97d04b73c1
commit d2b2ca3bc6

View File

@ -58,7 +58,7 @@ public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor
private BeanFactory beanFactory; private BeanFactory beanFactory;
private String adviceBeanName; private String adviceBeanName;
private String metadataSourceBeanName; private String metadataSourceBeanName;
private final Serializable adviceMonitor = new Serializable() {}; private transient volatile Object adviceMonitor = new Object();
//~ Constructors =================================================================================================== //~ Constructors ===================================================================================================
@ -117,7 +117,7 @@ public class MethodSecurityMetadataSourceAdvisor extends AbstractPointcutAdvisor
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException { private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
ois.defaultReadObject(); ois.defaultReadObject();
adviceMonitor = new Object();
attributeSource = beanFactory.getBean(metadataSourceBeanName, MethodSecurityMetadataSource.class); attributeSource = beanFactory.getBean(metadataSourceBeanName, MethodSecurityMetadataSource.class);
} }