We have a component that requires an array of strings. See the code below
for the config declaration.
public @interface Config {
@AttributeDefinition(name = "Services list")
String[] services_list();
}
This works if we set the config attribute to be an array. It does not seem
to work though
when I configure the config using a .cfg file in karaf.
As far as I know there I can only use plain strings. So our list can be
represented as Service1,Service2 but this is not automatically converted to
an array.
I already asked this in osgi-dev and Neil answered that this will not work
out of the box.
So I wonder if we could tweak the handling of .cfg files in felix
fileinstall (I hope this is the correct project) so it already parses the
values and returns a String[].
Possible syntaxes could be:
String1,String2
[String1,String2]
I guess the second syntax would be safer as it is unlikely that this is
used in a config already.
What do you think?
Christian
--
--
Christian Schneider
http://www.liquid-reality.de
Computer Scientist
http://www.adobe.com