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] [Work started] (FELIX-3977) @Property: ArrayIndexOutOfBoundsException empty array default value
Date Tue, 09 Apr 2013 12:12:17 GMT

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

Work on FELIX-3977 started by Carsten Ziegeler.

> @Property: ArrayIndexOutOfBoundsException empty array default value
> -------------------------------------------------------------------
>
>                 Key: FELIX-3977
>                 URL: https://issues.apache.org/jira/browse/FELIX-3977
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: scr annotations 1.7.0, scr annotations 1.9.0
>            Reporter: Felix Meschberger
>            Assignee: Carsten Ziegeler
>
> The following setup fails the SCR Plugin with an ArrayIndexOutOfBoundsException:
> >    private static final String PROP = "prop";
> >    @Property(name = PROP)
> >    private static final String[] PROP_DEFAULT = {};
> Stacktrace from SCR Plugin 1.11.0:
> Caused by: java.lang.ArrayIndexOutOfBoundsException
> 	at java.lang.reflect.Array.get(Native Method)
> 	at org.apache.felix.scrplugin.processing.SCRAnnotationProcessor.createProperties(SCRAnnotationProcessor.java:399)
> 	at org.apache.felix.scrplugin.processing.SCRAnnotationProcessor.process(SCRAnnotationProcessor.java:174)
> 	at org.apache.felix.scrplugin.helper.AnnotationProcessorManager.process(AnnotationProcessorManager.java:98)
> 	at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:213)
> 	at org.apache.felix.scrplugin.helper.ClassScanner.process(ClassScanner.java:161)
> 	at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:146)
> 	at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:149)
> 	at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:248)
> Workaround is to define without a default value like this:
> >    @Property(unbounded = PropertyUnbounded.ARRAY)
> >    private static final String PROP = "prop";
> >    private static final String[] PROP_DEFAULT = {};

--
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

Mime
View raw message