Craig McClanahan schrieb:
> On 11/23/06, Tom Schindl <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> the problem are not the methods visibility the methods in the sub-class
>> are public but their class declaration is not and you can call them if
>> you method.setAccessible(true) I've currently modified BeanUtils in my
>> project and it works perfectly.
> 
> 
> This solution will work (by default) ... until you try it on a server where
> a security manager with rational policies is enabled by default (such as
> had
> *better* be the case, for example, in a server environment that shares a
> JVM
> across multiple third party webapps).  If you don't think this is imprtant,
> you might as well be coding in a scripting language, because you are giving
> up one of the key advantages of using a strongly typed language like Java.

you are right in server environments this might bring us into trouble
under certain circumstance.

That's why I proposed to make this configurable because e.g. in my case
stand-alone SWT-Application (Loading GUI from XML) doesn't have any
problems with it.

BTW what I can not really understand is why I can not call a *public*
method from a class without setAccessible(true) using reflection when I
can do it in any ordinary java application.

Providing access to private, package, protected scoped methods should
not be allowed by the way using BeanUtils. The only thing I request is
to call public methods!

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to