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

camel-properties: Properties with types different from string are not taken into account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0.RC1
    • 3.0.0.RC2, 3.0.0
    • camel-properties
    • None
    • Unknown

    Description

      The properties component spi has a setOverrideProperties that allow to use an arbitrary Properties object so it is possible that the properties it holds are not of type string.

      In case the properties component is asked to resolve a non string property, then it will fail as DefaultPropertiesLookup uses Properties::getProperty [ยน] which returns null in case of the requested property is not of type string.

      The error is a little bit misleading as it states:

      because of PropertiesComponent with name properties must be defined in CamelContext to support property placeholders. Property with key [the.body] not found in properties from text: in.body == {{the.body}}
      

      [1] https://github.com/apache/camel/blob/master/components/camel-properties/src/main/java/org/apache/camel/component/properties/DefaultPropertiesLookup.java#L40

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: