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

Metatype AD empty String default value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • metatype-1.2.2
    • metatype-1.2.4
    • Metatype Service
    • None

    Description

      I have an AD with a default value which is an empty string, like

      <AD id="server" type="String" default=""/>

      According to the OSGi Spec, the method AttributeDefinition.defaultValue() in this case must return an array with one element (which should be the empty string), because the cardinality is 0 (implicit) and the default is defined.

      However, the Felix Metatype Service implementation returns null for defaultValue().

      In my use case, this breaks everything, because a null value indicates a configuration error (default not given, although mandatory) whereas an empty string is perfectly fine.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            ALemmer Andreas Lemmer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: