You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2013/05/05 12:32:17 UTC

[jira] [Assigned] (FELIX-4047) Unable to create empty or single valued String array property

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

Carsten Ziegeler reassigned FELIX-4047:
---------------------------------------

    Assignee: Carsten Ziegeler
    
> Unable to create empty or single valued String array property
> -------------------------------------------------------------
>
>                 Key: FELIX-4047
>                 URL: https://issues.apache.org/jira/browse/FELIX-4047
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.8.0, maven-scr-plugin-1.12.0
>            Reporter: Thomas Joseph
>            Assignee: Carsten Ziegeler
>
> There is no way that I can declare an empty or a single valued String array property.
> @Property(label="Multivalued Property", value={"only-single-value"})
> private static final String MV_PROPERTY= "multivalued.property";
> OR
> @Property(label="Multivalued Property", value={"only-single-value"}, unbounded=PropertyUnbounded.ARRAY)
> private static final String MV_PROPERTY= "multivalued.property";
> OR
> @Property(label="Multivalued Property", value={"only-single-value"}, cardinality=N)
> private static final String MV_PROPERTY= "multivalued.property";
> All would generate the same DS XML file as:
> <property name="multivalued.property" value="only-single-value"/>
> As of now the only workaround is to declare an array with at-least two entries:
> @Property(label="Multivalued Property", value={"only-single-value", ""})
> private static final String MV_PROPERTY= "multivalued.property";
> OR
> @Property(label="Multivalued Property", value={"", ""})
> private static final String MV_PROPERTY= "multivalued.property";

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira