commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Schulte (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (JEXL-101) Vararg methods where the first argument is no vararg can not be called with only the fixed parameters given
Date Mon, 03 May 2010 09:49:57 GMT

    [ https://issues.apache.org/jira/browse/JEXL-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863275#action_12863275
] 

Tobias Schulte edited comment on JEXL-101 at 5/3/10 5:49 AM:
-------------------------------------------------------------

OK, you are right, 

{code:java}test.callMixed(1, null);{code} 

calls the method with args being null. I was sure, it would be an array of size 1. 

OK: in

{code:java}
Object value = null;
test.callMixed(1, value);
{code} 

args is an array of size 1 with args[0] == null. Learned something new today. 

      was (Author: tobiasschulte):
    OK, you are right, 

{code:java}test.callMixed(1, null);{code} 

calls the method with args being null. I was sure, it would be an array of size 1. Learned
something new today. 
  
> Vararg methods where the first argument is no vararg can not be called with only the
fixed parameters given
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JEXL-101
>                 URL: https://issues.apache.org/jira/browse/JEXL-101
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Tobias Schulte
>            Assignee: Henri Biestro
>             Fix For: 2.0.2
>
>         Attachments: jexl-varargs.patch
>
>
> When you have a public String testVarArgsMixed(Integer fixed, Integer[] args) in a class
Test, put a test instance in the context and evaluate the expression test.testVarArgsMixed(1),
the MethodExecutor is not able to find the method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message