[hibernate-commits] Hibernate SVN: r10326 - branches/Branch_3_2/Hibernate3/src/org/hibernate/bytecode/javassist
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Aug 23 18:42:18 EDT 2006
Author: steve.ebersole at jboss.com
Date: 2006-08-23 18:42:16 -0400 (Wed, 23 Aug 2006)
New Revision: 10326
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java
Log:
HHH-2001 : upgrade javassist
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java 2006-08-23 22:41:38 UTC (rev 10325)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/bytecode/javassist/BulkAccessorFactory.java 2006-08-23 22:42:16 UTC (rev 10326)
@@ -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