On Thursday, February 13, 2003, at 04:23 AM, Niclas Hedhman wrote:

On Thursday 13 February 2003 03:03, robert burrell donkin wrote:
On Tuesday, February 11, 2003, at 11:35 PM, Richard Bair wrote:

<snip>

BTW, Mark, I'm totally wrong.  The java.beans package goes all the way
back to 1.2.2 at least.  I think it will work well for what we are doing
here.
if you're using java 1.3 (and maybe some earlier versions), you need to be
a bit beware since reflection is buggy.
This is a pretty bold statement...
I have been using java.lang.reflect since it was introduced (in fact I had my
own implementation in JDK 1.0), and have not experienced any "issues", "bugs"
or the like.
AFAIK, Serialization also depends heavily on it, and RMI depends on
Serialization, and J2EE depends heavily on RMI. You really think that
anything "buggy" would be tolerated to stay around for that long (when was
1.2 released? 1998?, 1999?).
serialization is a special case since it only sort-of uses reflection.

Do you have any example of this "reflection is buggy"??
in java 1.3, the basic reflection code works ok for the most common cases but when you get to the more obscure ones, it lets you down. any time that the compiler will find a method and allow it to be called, i'd say that if you can't do the same through reflection it's a bug.

Class.getMethod(String name, Class[] parameterTypes) does not always find methods which exist. in some cases, the methods returned do not have the accessibility set as per the JLS meaning that they cannot be executed by reflection (without calling setAccessibility). for more details, play around with the beanutils test cases or take a look in bugzilla for bug reports against beanutils.

- robert


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

Reply via email to