Java POJO with reference marked as multiplicity 0..1 is given a reference proxy 
even when the reference is unwired
------------------------------------------------------------------------------------------------------------------

                 Key: TUSCANY-3013
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3013
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-2.0
            Reporter: Mike Edwards
            Assignee: Mike Edwards
             Fix For: Java-SCA-2.0


If I have:
o a <component/> in a composite which uses a Java POJO as its implementation, 
o that POJO has a reference, which is declared with @Reference(required=false), 
so that the reference multiplicity is 0..1
o the <component/> leaves the <reference/> unwired (by any means)

the current code injects a Proxy into that reference - a Proxy that is unwired, 
and which causes an exception when invoked.

This is incorrect behaviour.  An unwired 0..1 reference should cause the 
injection of null into the reference in the POJO and the POJO should be able to 
test for this null at runtime and so avoid calling the reference.

The test which revealed this problem is the OASIS Assembly testcase 
ASM_12006_TestCase

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

Reply via email to