[ 
https://issues.apache.org/jira/browse/FELIX-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17409404#comment-17409404
 ] 

guiquan weng commented on FELIX-6455:
-------------------------------------

I am setting the default value in java where I have the full control, 
flexibility and no problem with escaping:
{code:java}
    @AttributeDefinition(name = "test")
    String testRegex() default "^someFancyRegExExpression$";
{code}
the solution is ok for me.

What maybe could be improved is the document to say that the default value is 
not escaped. therefore special characters should not be used, especially "[" 
and "]". 

 

> configadmin.plugin.interpolation: default Value with "]" is interpreted wrong
> -----------------------------------------------------------------------------
>
>                 Key: FELIX-6455
>                 URL: https://issues.apache.org/jira/browse/FELIX-6455
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: guiquan weng
>            Priority: Major
>
> configadmin.plugin.interpolation interpreted the default value with "]" wrong:
>  * $[env:notset;default=[8080]]        => [8080](/)
>  * $[env:notset;default=[aabb]cc]     => [aabbcc] (x)
> To show the bug I have created a branch with a unit test: 
> [https://github.com/apache/felix-dev/compare/master...orangeven:bugfix/configadmin-plugins-interpolation-default-value-with-special-chars?expand=1]
> Line 162 failed with message:
> {noformat}
> org.junit.ComparisonFailure: 
> Expected :[aabb]cc
> Actual :[aabbcc]{noformat}



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

Reply via email to