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

[properties-binding] support for list binding with gaps

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Assuming we have a set of properties like:

      camel.k.sources[0] = #class:SourceDefinition
      camel.k.sources[0].name = timer
      camel.k.sources[0].language = yaml
      camel.k.sources[3] = #class:SourceDefinition
      camel.k.sources[3].name = test
      camel.k.sources[3].language = xml
      

      Then binding to a target class with a code like:

      PropertyBindingSupport.build()
                  .withCamelContext(context)
                  .withTarget(conf)
                  .withProperties(properties)
                  .withRemoveParameters(false)
                  .withOptionPrefix("camel.k.")
                  .withConfigurer(configurer)
                  .bind()
      

      Would fail for index out of bound.

        Attachments

          Activity

            People

            • Assignee:
              lb Luca Burgazzoli
              Reporter:
              lb Luca Burgazzoli
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: