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] [Commented] (FELIX-4393) @Property should accept empty name values on instance fields
Date Wed, 05 Mar 2014 13:41:42 GMT

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

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

I've committed a change to the scr annotations project, could you please give it a try (you
just need to udpate that dependency to the current snapshot)
If a field is non static and has neither value nor name specified, it takes the field name
as the property name and the field value as the property value

>  @Property should accept empty name values on instance fields 
> --------------------------------------------------------------
>
>                 Key: FELIX-4393
>                 URL: https://issues.apache.org/jira/browse/FELIX-4393
>             Project: Felix
>          Issue Type: Improvement
>          Components: Maven SCR Plugin
>    Affects Versions: scr annotations 1.9.6
>            Reporter: james strachan
>            Assignee: Carsten Ziegeler
>             Fix For: scr annotations 1.9.8
>
>
> 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.2#6252)

Mime
View raw message