aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Commented] (ARIES-847) Nullpointer exception in org.apache.aries.blueprint.container.BeanRecipe.destroy
Date Mon, 07 May 2012 16:06:49 GMT


Christian Schneider commented on ARIES-847:

Sounds good. I am not sure if a warning is necessary in the null case though. I assume the
obj is null in my case as the creation was not successful so the really interesting thing
is the exception that is then thrown. The warning might rather confuse people in this case.
Perhaps we could do the following:

if (obj == null) {

if (!(obj instanceof UnwrapperedBeanHolder)) {
  throw new IllegalArgumentException("Object to be destroyed is not an instance of UnwrapperedBeanHolder,
type: " + obj.getClass());

So in case of null we do no warning as there is an exception anyway. In the case of a wrong
type we could throw an exception as this really should not happen.

What do you think?

> Nullpointer exception in org.apache.aries.blueprint.container.BeanRecipe.destroy
> --------------------------------------------------------------------------------
>                 Key: ARIES-847
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: 0.4
>            Reporter: Christian Schneider
>            Assignee: Sergey Beryozkin
>             Fix For: 0.4
>         Attachments: aries-847-1.patch
> If the blueprint file contains an error the obj given to destroy may be null. Currently
this is not handled. The big problem in this case is that the user does not get a good error
message about his error in the context.
> I will add a patch with the check.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message