You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/09/24 10:42:07 UTC

[jira] [Created] (CAMEL-5644) Bean component - Should use try conversion when choosing method based on parameter type matching

Claus Ibsen created CAMEL-5644:
----------------------------------

             Summary: Bean component - Should use try conversion when choosing method based on parameter type matching
                 Key: CAMEL-5644
                 URL: https://issues.apache.org/jira/browse/CAMEL-5644
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.10.0, 2.9.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
            Priority: Minor
             Fix For: 2.9.4, 2.11.0, 2.10.2


When the bean component has to pick among overloaded methods, then it does best matching on parameter types etc.

We should relax the type conversion to try attempt.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-5644) Bean component - Should use try conversion when choosing method based on parameter type matching

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5644.
--------------------------------

    Resolution: Fixed
    
> Bean component - Should use try conversion when choosing method based on parameter type matching
> ------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5644
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5644
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0, 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.4, 2.11.0, 2.10.2
>
>
> When the bean component has to pick among overloaded methods, then it does best matching on parameter types etc.
> We should relax the type conversion to try attempt.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAMEL-5644) Bean component - Should use try conversion when choosing method based on parameter type matching

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461674#comment-13461674 ] 

Claus Ibsen commented on CAMEL-5644:
------------------------------------

For example the replace overloaded method on java.lang.String, has changed order between java6 and 7.
Which causes Camel to try the char based types on java7 first, where as on java6 it was the string based parameters.

Running the SimpleTest demonstrates this on Java7
{code}
testBodyOgnlReplace(org.apache.camel.language.simple.SimpleTest): Failed to invoke method: .replace("Kamel", "Camel") on null due to: org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: replace("Kamel", "Camel") on null due to: org.apache.camel.TypeConversionException: Error during type conversion from type: java.lang.String to the required type: char with value Kamel is a cool Kamel due java.lang.IllegalArgumentException: String must have exactly a length of 1: Kamel is a cool Kamel
{code}
                
> Bean component - Should use try conversion when choosing method based on parameter type matching
> ------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5644
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5644
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0, 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.4, 2.11.0, 2.10.2
>
>
> When the bean component has to pick among overloaded methods, then it does best matching on parameter types etc.
> We should relax the type conversion to try attempt.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira