felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-2704) @Property(cardinality=Integer.MAX_Int, ...) causes java.lang.NumberFormatException
Date Fri, 18 Feb 2011 13:21:38 GMT

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

Carsten Ziegeler updated FELIX-2704:
------------------------------------

    Component/s:     (was: Declarative Services (SCR))
                 SCR Annotations
                 Maven SCR Plugin
       Assignee: Carsten Ziegeler

> @Property(cardinality=Integer.MAX_Int, ...) causes java.lang.NumberFormatException
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-2704
>                 URL: https://issues.apache.org/jira/browse/FELIX-2704
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin, SCR Annotations
>    Affects Versions: scr annotations 1.4.0
>         Environment: ubuntu 10.10
>            Reporter: sam
>            Assignee: Carsten Ziegeler
>
> @Property(cardinality=   seems to take the value as String and try to parse it.
> I have:
> @Property(cardinality=Integer.MAX_INT, label="hosts", description="a list of hosts",
value={})
> private static final String PROP_HOSTS = "com.mycompany.hosts";
> and, mvn clean package gives me:
> java.lang.NumberFormatException: For input string: "Integer.MIN_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:59)
> 	at org.apache.felix.scrplugin.tags.annotation.defaulttag.PropertyTag$1.cardinality(PropertyTag.java:47)
> 	at org.apache.felix.scrplugin.tags.annotation.defaulttag.PropertyTag.createNamedParameterMap(PropertyTag.java:237)
> 	at org.apache.felix.scrplugin.tags.annotation.defaulttag.AbstractTag.getNamedParameterMap(AbstractTag.java:122)
> 	at org.apache.felix.scrplugin.tags.annotation.defaulttag.AbstractTag.getNamedParameter(AbstractTag.java:54)
> 	at org.apache.felix.scrplugin.helper.PropertyHandler.getPropertyName(PropertyHandler.java:210)
> 	at org.apache.felix.scrplugin.helper.PropertyHandler.testProperty(PropertyHandler.java:314)
> 	at org.apache.felix.scrplugin.helper.PropertyHandler.handleField(PropertyHandler.java:335)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.createComponent(SCRDescriptorGenerator.java:522)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:274)
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:166)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message