Sam Wright created ARIES-1474:
---------------------------------

             Summary: 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
            Reporter: Sam Wright


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