You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2016/01/12 12:14:39 UTC

[jira] [Commented] (ARIES-1474) blueprint-maven-plugin: Inherited init/destroy methods are ignored

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

Christian Schneider commented on ARIES-1474:
--------------------------------------------

There is a problem with the pull request. The two new classes have headers like:
// EGS-CC
// (C) Copyright European Space Agency, 2015
You need to give them the default apache header. 
I am pretty sure this was unintended but in accepting the PR I would pollute the apache code with non apache license.


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