You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/02/28 11:09:19 UTC

[jira] [Commented] (FELIX-4393) @Property should accept empty name values on fields

    [ https://issues.apache.org/jira/browse/FELIX-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915626#comment-13915626 ] 

Carsten Ziegeler commented on FELIX-4393:
-----------------------------------------

Can you give an example? How do you specify the value?

Is it like

@Property
public static final String PROP_NAME = "value"

?

>  @Property should accept empty name values on fields 
> -----------------------------------------------------
>
>                 Key: FELIX-4393
>                 URL: https://issues.apache.org/jira/browse/FELIX-4393
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven SCR Plugin
>            Reporter: james strachan
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin 1.15.2, scr ant task 1.9.2, scr generator 1.8.4
>
>
> it'd be nice if @Property behaved like various other annotations (e.g. @Inject / @Resource) so that if a name is not specified and @Property is specified on a field, then the name value defaults to the field name.
> It looks like name is optional with a default of "" - so its just the maven scr plugin which seems to barf if name is empty generating this kind of compile error:
> {code}
> @Property : Property name can not be empty.
> {code}
> It'd be nice if the name was optional; it makes the code more DRY and keeps things more refactoring safe etc



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)