[ 
https://issues.apache.org/jira/browse/TUSCANY-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Krizsan updated TUSCANY-3505:
----------------------------------

    Attachment: testcase_patch
                impl_patch

Patched DestroyProcessor to allow @Destroy annotation on methods with private, 
protected or default visibility in addition to public methods.
Patched the test for the DestroyProcessor as well, since it tested private and 
protected methods annotated with @Destroy.
Added a test case in the DestroyProcessor test testing methods with default 
visibility annotated with @Destroy.


> @Destroy annotation not allowed on non-public methods.
> ------------------------------------------------------
>
>                 Key: TUSCANY-3505
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3505
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-2.0-M3
>         Environment: Affects version 2.0-M4 and recent nightly builds.
>            Reporter: Ivan Krizsan
>         Attachments: impl_patch, testcase_patch
>
>
> There seems to be a bug in 2.0M4 preventing the use of @Destroy on private 
> and protected methods. If @Destroy is used to annotate a method with package 
> visibility, no exception is thrown but the method is never called when the 
> component is to be taken out of service.
> According to section 10.8 in Service Component Architecture SCA-J Common 
> Annotations and APIs Specification Version 1.1, such a method may have
> any access modifier.
> To correct this, remove lines 62-64 in the class 
> org.apache.tuscany.sca.implementation.java.introspect.impl.DestroyProcessor 
> in the module implementation-java.

-- 
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