[ 
https://issues.apache.org/jira/browse/CAMEL-26895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-26895.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/29735 (merged as 89b8be7d97d0 on 
main, 4.24.0).

_Claude Code on behalf of davsclaus_

> @BeanConfigInject binds sibling properties outside the configured prefix
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-26895
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26895
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Sharang Gupta
>            Priority: Major
>             Fix For: 4.24.0
>
>
> CamelPostProcessorHelper.getInjectionBeanConfigValue collects properties for 
> @BeanConfigInject("prefix") with uKey.startsWith(uRootKey) and no boundary 
> check, although the surrounding code clips a trailing '.' and strips a 
> leading '.' from the remainder (the intended boundary is '.'). So a sibling 
> property whose key merely starts with the prefix is wrongly bound: 
> @BeanConfigInject("db") with properties db.url and database.name binds a 
> phantom entry "tabase.name". Present on 4.23.0.
> Fix: match the key exactly or the prefix followed by '.'. Branch + regression 
> test ready (extends MainIoCBeanConfigInjectMapTest).
> Prepared by Claude Code on behalf of Sharang Gupta.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to