camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-11280) camel-twitter : hard-coded component scheme
Date Mon, 15 May 2017 09:34:04 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-11280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Luca Burgazzoli resolved CAMEL-11280.
-------------------------------------
    Resolution: Fixed

> camel-twitter : hard-coded component scheme
> -------------------------------------------
>
>                 Key: CAMEL-11280
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11280
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-twitter
>            Reporter: Luca Burgazzoli
>            Assignee: Luca Burgazzoli
>             Fix For: 2.20.0
>
>
> The camel twitter component parses the uri assuming the component has twitter as as scheme
which is correct in most of the cases but could fail if one would pre-configure a number of
twitter components:
> {code:xml}
> <bean id="tw-account-1" class="rg.apache.camel.component.twitter.TwitterComponent">
>   <property name="accessToken" value="tokenForAccount1"/>
> </bean>
> <bean id="tw-account-2" class="rg.apache.camel.component.twitter.TwitterComponent">
>   <property name="accessToken" value="tokenForAccount2"/>
> </bean>
> <camelContext>
>   <route>
>     <from uri="tw-account-1:search"/>  
>     ...
>   </rute>
>   <route>
>     <from uri="tw-account-2:timeline/mentions"/>  
>     ...
>   </rute>
> <camelContext/>
> {code}
> Relevant code:
> - https://github.com/apache/camel/blob/master/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterHelper.java#L43-L44
> - https://github.com/apache/camel/blob/master/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/TwitterHelper.java#L156-L161



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message