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

Carsten Ziegeler commented on FELIX-6009:
-----------------------------------------

Committed the potential fix:
https://github.com/apache/felix-dev/commit/6a75e1226141b3f99cb8051da33be427f1c293b4

> Metatype AD empty String default value
> --------------------------------------
>
>                 Key: FELIX-6009
>                 URL: https://issues.apache.org/jira/browse/FELIX-6009
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.2.2
>            Reporter: Andreas Lemmer
>            Assignee: Carsten Ziegeler
>            Priority: Critical
>             Fix For: metatype-1.2.4
>
>
> I have an AD with a default value which is an empty string, like
> {{<AD id="server" type="String" default=""/>}}
> According to the OSGi Spec, the method AttributeDefinition.defaultValue() in 
> this case must return an array with one element (which should be the empty 
> string), because the cardinality is 0 (implicit) and the default is defined.
> However, the Felix Metatype Service implementation returns null for 
> defaultValue().
> In my use case, this breaks everything, because a null value indicates a 
> configuration error (default not given, although mandatory) whereas an empty 
> string is perfectly fine.



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

Reply via email to