Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

DS 1.4 Component Property Type Annotations: Allow elements which only optionally create component properties #46

@kwin

Description

@kwin

Although https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.component.html#service.component-component.property.value.coercion states

If there is no corresponding component property for a component property type method, the component property type method must:
...
Return null for String, Class, and enum.

This behaviour cannot be leveraged with annotations used on components. So if you want to use the annotation to express a specific component property to be either a String or not set at all, you cannot do that with an element of an already existing annotation (as JLS does not allow null as default value)

For a concrete use case look at https://issues.apache.org/jira/browse/SLING-2938?focusedCommentId=17199448&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17199448

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions