kbarlowgw commented on PR #309:
URL: 
https://github.com/apache/commons-configuration/pull/309#issuecomment-2123005158

   Thanks for pointing this out.  Please link the JIRA here when opened and
   I'll take a look at it.
   
   On Tue, May 21, 2024 at 11:30 AM Tim Donohue ***@***.***>
   wrote:
   
   > I've run into an odd bug when using Commons Configuration v2 + Spring Boot
   > which I *believe* is caused by a change in this small PR. During a
   > routine upgrade from Commons Configuration v2.9.0 to v2.10.1, we discovered
   > that our multivalued configurations (i.e. an array or list of values) were
   > only loading the *first value* into Spring. In other words, it seems to
   > no longer be possible to load multivalued configurations into Spring Beans
   > via something like this:
   >
   > @Value("${some.multivalued.prop}")
   > String[] myMultivaluedVariable;
   >
   > I could be wrong, but I *believe* it may be caused by the change from
   > getProperty() to getString() in this PR, because getString() is documented
   > to only return the *first value* in a list of values
   > 
<https://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#List_handling>
   > .
   >
   > Of interest is also the last line of the example fragment. Here the
   > getString() method is called for a property that has multiple values.
   > This call will return the first value of the list.
   >
   > I don't know of the proper solution to this issue, but I can confirm that
   > v2.9.0 works properly for multivalued configurations, but both v2.10.0 and
   > v2.10.1 do not (in both those versions we are seeing only the first value
   > loaded into Spring for multivalued configurations).
   >
   > Finally, my apologies for adding this comment on a closed PR (as I realize
   > that's not the best practice in OSS). I've requested a login to your JIRA
   > <https://issues.apache.org/jira/projects/CONFIGURATION/issues>
   > to report this as a possible bug, but I'm waiting for approval. So, I'll
   > move these notes over to JIRA once given permissions to do so.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > 
<https://github.com/apache/commons-configuration/pull/309#issuecomment-2122895973>,
   > or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/BBG2EVGBTSEU6ZZQWJEIQHTZDNSBXAVCNFSM6AAAAAA2G3T3VKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSHA4TKOJXGM>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to