|
From: Marten W. <mar...@ly...> - 2003-01-13 12:55:03
|
I fixed a bug in ReflectionUtils. Please try the ObjectFactoryTest und Linux again. marten -- On Mon, 13 Jan 2003 03:16:02 Marten Wulff wrote: >If you have two methods, with the same signature, except that one parameter is a primitive type and one is the corresponding object type e.g methodName(boolean, String) and methodName(Boolean, String) >we'll always find the second method with the object type as argument, because the arguments that are passed to the Proxy-Object are always given as Object array. That means ReflectionUtils is only responsible for finding a correspondig method with primitive arguments, although the parameters are given as Objects. That explains the behaviour you've mentioned (calling the method with the >primitive type returns the method with the object type). >Nevertheless ReflectionUtils cannot find a method with a some primitive types as arguments under linux. Maybe their is something wrong with the call Member.isPrimitive(). > >marten > >-- > >On 11 Jan 2003 18:02:46 +010 > Theodor Willax wrote: >>It seems to be a problem in the ReflectionUtils class on Linux. I've >>added a new method in ParameterTester class named doubleName(Boolean, >>String). Note it's a Boolean object, not the primitive type boolean. Now >>the test runs, but there is not the right result from the method call. >>If I call doubleName(Boolean, String) I get the result "Method >>doubleName(Boolean, String) called". That's ok. >> >>If I call the method with the primitive type boolean, >>doubleName(boolean, String) I get also the result "Method >>doubleName(Boolean, String) called". >> >>So it seems to be a problem with overloaded methods containing primitive >>types. That was the cause for the argument type mismatch error. >>ReflectionUtils returned the method doubleName(Integer, String) although >>we called doubleName(boolean, String) bevore I've added >>doubleName(Boolean, String). >> >>Theo >> >> > > >_____________________________________________________________ >Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. >http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus > _____________________________________________________________ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus |