Sharang Gupta created CAMEL-26895:
-------------------------------------
Summary: @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
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)