You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2013/04/24 23:31:15 UTC

[jira] [Commented] (FELIX-4035) Issue warning messages when SCR annotations miss proper descriptions and labels

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

Felix Meschberger commented on FELIX-4035:
------------------------------------------

Re Case1: Defaults for label and descriptions are defined (see the doc). Hence omission in the annotations is quite valid and nothing must be logged

Re Case2: Again, defaults are defined and nothing must be logged

Re Case3: That probably makes sense ...

As a corollary to cases 1 and 2, though: The plugin could check whether there is a metatype.properties file in the bundle, which provides translations for labels and descriptions starting with a "%" sign (the default values are in fact "%"-prefix strings)
                
> Issue warning messages when SCR annotations miss proper descriptions and labels
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-4035
>                 URL: https://issues.apache.org/jira/browse/FELIX-4035
>             Project: Felix
>          Issue Type: Improvement
>          Components: Declarative Services (SCR)
>            Reporter: Jörg Hoh
>
> When using SCR annotations you can easily create services and components, which do not have proper labels and descriptions. We should warn in these cases.
> Case 1: 
> {code}
> @Component(metatype=true)
> @Property(...)
> {code}
> When a metatype is being generated, a label and a description should be provided as well. The warn message could be "A metatype should always have a label and a description".
> Case 2:
> {code}
> @Component(metatype=true)
> @Property(name="foo",value="bar")
> {code}
> When a metatype is being generated, containing properties which are not marked as private, a warning "Non-private properties in a metatype should always have a label and a description" should be logged.
> Case 3:
> {code}
> @Component(metatype=true)
> {code}
> In case a metatype is being created without any property, a warning "A metatype should have properties; in case no properties are wanted, consider to use 'metatype=false'" should be logged.
> (inspired by FELIX-4033, thanks Robert)

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