You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Eric Covener <co...@gmail.com> on 2010/02/26 18:44:42 UTC

Re: [jira] Commented: (OWB-307) InvocationContext.setParameters() and primitive vs. wrapped types

>            } else if (!parameterType.isInstance(parameter)) {
>                throw new IllegalArgumentException("Expected parameter " + i + " to be of type " + parameterType.getName() +
>                    ", but got a parameter of type " + parameter.getClass().getName());
>            }

David,


Thanks for the update.  The TCK is expecting to replace the a
primitive parameter with the corresponding wrapped type with a call to
InvocationContext.setParameters(), which fails this test:

    java.lang.IllegalArgumentException: Expected parameter 0 to be of
type int, but got a parameter of type java.lang.Integer

Do you think such a thing should be tolerated, or do you think the
exception is more desirable here?

-- 
Eric Covener
covener@gmail.com