[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Peter Muir
peter at bleepbleep.org.uk
Fri Apr 13 11:15:09 EDT 2007
User: pmuir
Date: 07/04/13 11:15:09
Modified: src/main/org/jboss/seam Component.java
Log:
JBSEAM-1176
Revision Changes Path
1.244 +8 -0 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -b -r1.243 -r1.244
--- Component.java 6 Mar 2007 04:35:45 -0000 1.243
+++ Component.java 13 Apr 2007 15:15:09 -0000 1.244
@@ -31,6 +31,7 @@
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -1115,7 +1116,14 @@
protected Object instantiateEntityBean() throws Exception
{
+ Constructor constructor = getBeanClass().getConstructor(new Class[0]);
+ boolean accessible = constructor.isAccessible();
+ if (Modifier.isProtected(constructor.getModifiers()))
+ {
+ constructor.setAccessible(true);
+ }
Object bean = getBeanClass().newInstance();
+ constructor.setAccessible(accessible);
initialize(bean);
return bean;
}
More information about the jboss-cvs-commits
mailing list