Your wrapped code does not handle null arguments. And
that is why [collections] doesn't do it that way.
Stephen


--- Nikita Zhuk <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I have a question about Commons Collections' (v 3.2)
> invokerClosure()  
> method of ClosureUtils class. Currently the method
> signature is:
> 
> public static Closure invokerClosure(String
> methodName, Class[]  
> paramTypes, Object[] args)
> 
> I would like to know why there has to be explicit
> paramTypes  
> parameter, i.e. is there something wrong in calling
> .getClass() on  
> each argument (which returns actual class of an
> object due of  
> polymorfism)? In my code I've wrapped that call as
> following:
> 
>      public static Closure invokerClosure(String
> methodName, Object[]  
> args)
>      {
>              Class[] paramTypes = new
> Class[args.length];
> 
>              for(int i = 0; i < args.length; i++)
>              {
>                  paramTypes[i] = args[i].getClass();
>              }
> 
>          return
> ClosureUtils.invokerClosure(methodName, paramTypes, 
> 
> args);
>      }
> 
> 
> - Nikita Zhuk
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

Reply via email to