tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilbert Kwan (JIRA)" <tuscany-...@ws.apache.org>
Subject [jira] Commented: (TUSCANY-2289) Java runtime should inject property into an unannotated non-public field by public setter
Date Thu, 01 May 2008 19:44:55 GMT

    [ https://issues.apache.org/jira/browse/TUSCANY-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593616#action_12593616
] 

Gilbert Kwan commented on TUSCANY-2289:
---------------------------------------

Q 1. protected field and its setter is protected 
    - there should be no injection. 
A: Only in the case of protected field without a setter method, the property should not be
injected. 

I tested above that un-annotated protected field is injected by its protected setter

> Java runtime should inject property into an unannotated non-public field by public setter
> -----------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2289
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2289
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-Next
>            Reporter: Gilbert Kwan
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>
> Java Common Annotations and APIs v1.0 - Sec 1.8.13:
> 1349 Properties may also be injected via public setter methods even when the @Property
annotation is not
> 1350 present. However, the @Property annotation must be used in order to inject a property
onto a non-public
> 1351 field. In the case where there is no @Property annotation, the name of the property
is the same as the
> 1352 name of the field or setter.
> Currently the properties are injected into unannotated protected fields too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message