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

A. J. David Bosschaert updated FELIX-6273:
------------------------------------------
    Fix Version/s:     (was: configadmin-interpolation-plugin-1.1.2)
                   configadmin-interpolation-plugin-1.1.4

> Improve behaviour when delimiter is set but the type is not
> -----------------------------------------------------------
>
>                 Key: FELIX-6273
>                 URL: https://issues.apache.org/jira/browse/FELIX-6273
>             Project: Felix
>          Issue Type: Improvement
>          Components: Configuration Admin
>    Affects Versions: configadmin-interpolation-plugin-1.1.0
>            Reporter: Robert Munteanu
>            Priority: Major
>             Fix For: configadmin-interpolation-plugin-1.1.4
>
>
> When configuring property values with a delimiter, it is expected that the 
> property is an array. Otherwise, the delimited does not make sense IMO.
> Assuming I have exporter {{PROP=foo,bar}}.
> If I configure interpolation for a property value as
> prop="$[env:PROP;delimiter=,]"
> At runtime it get interpolated to {{prop<String> = foo,bar}}, which is 
> clearly not what I expected. The correct syntax is
> prop="$[env:PROP;type=String[];delimiter=,]"
> after which the interpolation result is indeed {{ prop<String[]> = [foo, bar] 
> }}.
> There are a number of ways this could be improved
> - fail interpolation with an exception
> - log a WARN/ERROR message
> - assume that if a delimiter is present but the type is not, the type is 
> {{String[]}}, and not {{String}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to