camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6783) getFeatures() method of CxfEndpoint only accept AbstractFeature but Feature
Date Mon, 30 Sep 2013 15:32:25 GMT

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

James Carman commented on CAMEL-6783:
-------------------------------------

It's okay to take List<? extends Feature? on the input because you know all the things
in the input collection are Feature objects.  However, returning List<? extends Feature>
doesn't work well at all, because you can't add stuff to it.  Consider the following case:

{code:java}
List<? extends Serializable> list = ...;
list.add("Hello");
{code}

You can't do it, because "list" is a list of some type of things that extend Serializable.
 You don't *know* that the type is String, you just know it's some type extending from Serializable.
 

> getFeatures() method of CxfEndpoint only accept AbstractFeature but Feature
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-6783
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6783
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.12.0
>            Reporter: liugang
>         Attachments: CAMEL-6783.patch
>
>
> the *getFeatures()* method of *CxfEndpoint* only accept an instance of *AbstractFeature*,
but the original *ClientFactoryBean* accept *Feature* instance.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message