Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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:
@Component(metatype=true)
@Property(...)
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:
@Component(metatype=true) @Property(name="foo",value="bar")
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:
@Component(metatype=true)
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)
Attachments
Issue Links
- is cloned by
-
FELIX-4036 Check for label/description of component and properties when metatype information is generated
- Closed
- relates to
-
FELIX-5373 Improve failure message when enabling metatype and using no or private properties only
- Closed