Yes, I would like an unbounded array. The scr docs say to use Integer.MAX_INT but that isn't available in Integer nor can I specify it as a String since the field wants an int. What would be the correct way to specify an unbounded cardinality?
----- "Niels B Nielsen" <[email protected]> wrote: > Well, I assume you realise that you cannot replace an integer with an > expression that could evaluate to an integer. > > So basically you are asking how to specify an unbounded cardinality? > > -----Original Message----- > From: Carl F. Hall [mailto:[email protected]] > Sent: 17 December 2009 22:13 > To: [email protected] > Subject: SCR Cardinality > > I'm trying to setup a property to be an array without giving it any > initial values. > I've tried using this: > > @Property(cardinality = Integer.MAX_VALUE) > protected static final String PROP_ATTRIBUTES = > "ldap.provider.attributes"; > > But get this in my build: > java.lang.NumberFormatException: For input string: > "Integer.MAX_VALUE" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:449) > at java.lang.Integer.valueOf(Integer.java:554) > at > org.apache.felix.scrplugin.tags.annotation.defaulttag.Util.getIntValue(Util.java:58) > at > org.apache.felix.scrplugin.tags.annotation.defaulttag.PropertyTag$1.cardinality(PropertyTag.java:47) > at > org.apache.felix.scrplugin.tags.annotation.defaulttag.PropertyTag.getNamedParameterMap(PropertyTag.java:226) > at > org.apache.felix.scrplugin.tags.annotation.defaulttag.AbstractTag.getNamedParameter(AbstractTag.java:47) > ... > > I'm using version 1.0.0 of the annotations. Am I doing something > wrong? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > This email is confidential and subject to important disclaimers and > conditions including on offers for the purchase or sale of > securities, accuracy and completeness of information, viruses, > confidentiality, legal privilege, and legal entity disclaimers, > available at http://www.jpmorgan.com/pages/disclosures/email. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

