You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/10/17 14:49:52 UTC

[jira] Created: (CAMEL-2074) camel-bean - should skip getter/setter methods when looking for method candidates

camel-bean - should skip getter/setter methods when looking for method candidates
---------------------------------------------------------------------------------

                 Key: CAMEL-2074
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2074
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0.0, 1.6.1
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.1.0


If you have a POJO and you have a setter for a Camel concept such as a {{org.apache.camel.TypeConverter}} then the bean component could consider invoking the setTypeConverter method as a candidate.

In fact it should skip any getter/setter all together.

For example this pojo
{code}
public class RiderOrderService {

    private TypeConverter converter;

    public void setConverter(TypeConverter converter) {
        this.converter = converter;
    }

    public String handleCustom(GenericFile file) {
    ...
    }

    public String handleXML(Document doc) {
    ...
    }
{code}

Camel should only consider the 2 handle methods. The setter should be skipped.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2074) camel-bean - should skip getter/setter methods when looking for method candidates

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

Claus Ibsen commented on CAMEL-2074:
------------------------------------

Camel normally also skips the setters but in this case it get more attention as it has a Camel concept parameter.

> camel-bean - should skip getter/setter methods when looking for method candidates
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2074
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2074
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> If you have a POJO and you have a setter for a Camel concept such as a {{org.apache.camel.TypeConverter}} then the bean component could consider invoking the setTypeConverter method as a candidate.
> In fact it should skip any getter/setter all together.
> For example this pojo
> {code}
> public class RiderOrderService {
>     private TypeConverter converter;
>     public void setConverter(TypeConverter converter) {
>         this.converter = converter;
>     }
>     public String handleCustom(GenericFile file) {
>     ...
>     }
>     public String handleXML(Document doc) {
>     ...
>     }
> {code}
> Camel should only consider the 2 handle methods. The setter should be skipped.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2074) camel-bean - should skip getter/setter methods when looking for method candidates

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

Claus Ibsen resolved CAMEL-2074.
--------------------------------

    Resolution: Fixed

trunk: 826591.

> camel-bean - should skip getter/setter methods when looking for method candidates
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2074
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2074
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.6.1, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> If you have a POJO and you have a setter for a Camel concept such as a {{org.apache.camel.TypeConverter}} then the bean component could consider invoking the setTypeConverter method as a candidate.
> In fact it should skip any getter/setter all together.
> For example this pojo
> {code}
> public class RiderOrderService {
>     private TypeConverter converter;
>     public void setConverter(TypeConverter converter) {
>         this.converter = converter;
>     }
>     public String handleCustom(GenericFile file) {
>     ...
>     }
>     public String handleXML(Document doc) {
>     ...
>     }
> {code}
> Camel should only consider the 2 handle methods. The setter should be skipped.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.