|
From: Norris, T. <tys...@be...> - 2004-06-15 12:30:24
|
Hi all -
I asked a while back on the users list about private constructor
support, and would like to propose this change to
BeanUtils.instantiateClass(Class clazz):
Constructor ctor =3D clazz.getDeclaredConstructor(new
Class[]{});
if ((!Modifier.isPublic(ctor.getModifiers())) ||
(!Modifier.isPublic(clazz.getModifiers()))) {
ctor.setAccessible(true);
}
return ctor.newInstance(new Object[]{});
I suppose it would also be good to provide the same support for
BeanUtils.instantiateClass(Constructor constructor, Object[] args).
I would provide a patch, but cannot access CVS at the moment.
Let me know if I can provide any other assistance to promote this change
(should I create a JIRA issue?)
Thanks!
Tyson
|