You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Joseph (JIRA)" <ji...@apache.org> on 2013/05/03 14:38:17 UTC
[jira] [Created] (FELIX-4047) Unable to create empty or single
valued String array property
Thomas Joseph created FELIX-4047:
------------------------------------
Summary: 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.12.0, maven-scr-plugin-1.8.0
Reporter: Thomas Joseph
There is no way that I can declare an empty or a single valued String array is 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