You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "James Carman (JIRA)" <ji...@apache.org> on 2013/09/30 17:34:29 UTC
[jira] [Comment Edited] (CAMEL-6783) getFeatures() method of
CxfEndpoint only accept AbstractFeature but Feature
[ https://issues.apache.org/jira/browse/CAMEL-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13781935#comment-13781935 ]
James Carman edited comment on CAMEL-6783 at 9/30/13 3:34 PM:
--------------------------------------------------------------
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.
was (Author: jwcarman):
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)