[hibernate-commits] Hibernate SVN: r10322 - trunk/Hibernate3/src/org/hibernate/bytecode/javassist
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Aug 23 18:39:53 EDT 2006
Author: steve.ebersole at jboss.com
Date: 2006-08-23 18:39:36 -0400 (Wed, 23 Aug 2006)
New Revision: 10322
Modified:
trunk/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java
Log:
HHH-2001 : upgrade javassist
Modified: trunk/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java 2006-08-23 22:00:58 UTC (rev 10321)
+++ trunk/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java 2006-08-23 22:39:36 UTC (rev 10322)
@@ -2,6 +2,7 @@
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.security.ProtectionDomain;
import javassist.CannotCompileException;
import javassist.bytecode.AccessFlag;
@@ -61,7 +62,7 @@
FactoryHelper.writeFile( classfile, writeDirectory );
}
- beanClass = FactoryHelper.toClass( classfile, loader );
+ beanClass = FactoryHelper.toClass( classfile, loader, getDomain() );
return ( BulkAccessor ) this.newInstance( beanClass );
}
catch ( Exception e ) {
@@ -69,6 +70,17 @@
}
}
+ private ProtectionDomain getDomain() {
+ Class cl;
+ if ( this.targetBean != null ) {
+ cl = this.targetBean;
+ }
+ else {
+ cl = this.getClass();
+ }
+ return cl.getProtectionDomain();
+ }
+
private ClassFile make(Method[] getters, Method[] setters) throws CannotCompileException {
String className = targetBean.getName();
// set the name of bulk accessor.
More information about the hibernate-commits
mailing list