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

Sam Wright commented on ARIES-1474:
-----------------------------------

Woops! Thanks for catching that. I do love code review :-D

I've rebased my 4 pull requests (ARIES-1474, ARIES-1475, ARIES-1476 and 
ARIES-1481) on top of trunk, and corrected the headers to match the existing 
headers.

> blueprint-maven-plugin: Inherited init/destroy methods are ignored
> ------------------------------------------------------------------
>
>                 Key: ARIES-1474
>                 URL: https://issues.apache.org/jira/browse/ARIES-1474
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-maven-plugin-1.3.0
>            Reporter: Sam Wright
>            Assignee: Christian Schneider
>             Fix For: blueprint-maven-plugin-1.4.0
>
>
> Current behaviour:
> {code}
> public class A {
>     @PostConstruct
>     public void init() {}
>     @PreDestroy
>     public void destroy() {}
> }
> public class B extends A {}
> public class C extends B {
>     @Override
>     public void init() {}
>     @PostConstruct
>     public void secondInit()
> }
> {code}
> Three problems:
> * The A.destroy() method is ignored
> * The C.init() method overrides A.init() without the @PostConstruct 
> annotation, but is still taken to be the init method. This means the subclass 
> can't disable a superclass' init method.
> * The C.secondInit() method is silently ignored because another init method 
> is found first. 
> Patch incoming...



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

Reply via email to