[
https://issues.apache.org/jira/browse/ARIES-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15054539#comment-15054539
]
ASF GitHub Bot commented on ARIES-1474:
---------------------------------------
GitHub user samwright opened a pull request:
https://github.com/apache/aries/pull/33
[ARIES-1474] Fix init/destroy method inheritence.
https://issues.apache.org/jira/browse/ARIES-1474
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/samwright/aries ARIES-1474
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/aries/pull/33.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #33
----
commit a905bd2917d7b5272418449c53b1d86879c226cd
Author: Samuel Wright <[email protected]>
Date: 2015-12-12T16:38:35Z
[ARIES-1474] Fix init/destroy method inheritence.
----
> 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)