Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-2074

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1, 2.0.0
    • 2.1.0
    • camel-core
    • None

    Description

      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

      public class RiderOrderService {
      
          private TypeConverter converter;
      
          public void setConverter(TypeConverter converter) {
              this.converter = converter;
          }
      
          public String handleCustom(GenericFile file) {
          ...
          }
      
          public String handleXML(Document doc) {
          ...
          }
      

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

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: