felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Sedding (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FELIX-5404) Annotation configurations default values are not considered
Date Wed, 21 Dec 2016 12:35:58 GMT

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

Julian Sedding edited comment on FELIX-5404 at 12/21/16 12:35 PM:
------------------------------------------------------------------

Thanks [~cziegeler] and [~djencks]. It seems that my analysis of the issue I experienced was
wrong and the patch addressed the symptom rather than the cause. I have done some more manual
testing and have indications that the XML generated from my annotation is missing "property"
tags when the default value of a {{String[]}} is "{}". I'll have to dig some more to figure
out which tool is in use and which version is affected. Will follow up with a new issue if
appropriate.


was (Author: jsedding):
Thanks [~cziegeler] and [~djencks]. It seems that my analysis of the issue I experienced was
wrong and the patch addressed the symptom rather than the cause. I have done some more manual
testing and have indications that the XML generated from my annotation is missing "property"
tags when the default value of a {{String[]}} is {{\{\}}}. I'll have to dig some more to figure
out which tool is in use and which version is affected. WIll follow up with a new issue if
appropriate.

> Annotation configurations default values are not considered
> -----------------------------------------------------------
>
>                 Key: FELIX-5404
>                 URL: https://issues.apache.org/jira/browse/FELIX-5404
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.0.6
>            Reporter: Julian Sedding
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>         Attachments: FELIX-5404-integration-test-jsedding.patch, FELIX-5404-jsedding.patch
>
>
> When an annotation is used to configure an SCR component (as per DS 1.3), the annotation's
default values are not considered.
> This can lead to the odd situation that an annotation method with a default value returns
null. I'm not sure if this violates a contract or another, however, my IDE complains when
I do a null check.
> I think it would be the right thing to do to return the default value if no value is
explicitly configured.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message