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 2014/12/10 09:45:12 UTC

[jira] [Commented] (CAMEL-8137) Simple language does not resolve overloaded method calls

    [ https://issues.apache.org/jira/browse/CAMEL-8137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14240822#comment-14240822 ] 

Claus Ibsen commented on CAMEL-8137:
------------------------------------

Yeah the override method check was too stringent, checking that the types must be same. But we should relax that and check for type isAssignableFrom which is the situation with the java nio Path, where as getFileName is from the interface using the Path api, and the impl class uses the unix class types.

> Simple language does not resolve overloaded method calls
> --------------------------------------------------------
>
>                 Key: CAMEL-8137
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8137
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.0
>            Reporter: John Mark
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.14.2, 2.15.0
>
>
> I am having an issue with the Simple language. I have a property named {{myFile}} with a value of a {{java.nio.file.Path}} object. When I try to use the following expression {noformat} ${property.file.getFileName} {noformat} in order to invoke the getFileName() method I get an exception saying:
> {noformat}
> Ambiguous method invocations possible: [public sun.nio.fs.UnixPath.getFileName(), public abstract java.nio.file.Path java.nio.file.Path.getFileName()]
> {noformat}
> I am able to use SpEL if I do
> {noformat}
> #{properties[myFile].getFileName()}
> {noformat}
> It would be nice if Simple supported this as well so I wouldn't have to go through hoops in order to use SpEL since I can't use SpEL to specify parameters in a uri.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)