Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4035

Issue warning messages when metatype is be created, but no properties are defined

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              cziegeler Carsten Ziegeler
              joerghoh Joerg Hoh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: