You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Antonin Stefanutti (JIRA)" <ji...@apache.org> on 2015/12/04 18:26:11 UTC

[jira] [Updated] (OWB-1102) ProcessInjectionPoint observer is resolved for declared injection points with parent class

     [ https://issues.apache.org/jira/browse/OWB-1102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonin Stefanutti updated OWB-1102:
------------------------------------
    Description: 
In the following test case:
{code}
class A {}

class B extends A {}

class Bean {
    @Inject A a;
}

public class TestExtension implements Extension {

    void test(@Observes ProcessInjectionPoint<?, B> pip) {
    }
}

@RunWith(Arquillian.class)
public class OwbTest {

    @Deployment
    public static Archive<?> deployment() {
        return ShrinkWrap.create(JavaArchive.class)
            .addClasses(A.class, B.class, Bean.class)
            .addAsServiceProvider(Extension.class, TestExtension.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    @Test
    public void test() {
    }
}
{code}

The lifecycle observer method is called.

  was:
In the following test case:
{code}
class A {}

class B extends A {}

class Bean {
    @Inject A a;
}

public class TestExtension implements Extension {

    void test(@Observes ProcessInjectionPoint<?, B> pip) {
        pip.getInjectionPoint();
    }
}

@RunWith(Arquillian.class)
public class OwbTest {

    @Deployment
    public static Archive<?> deployment() {
        return ShrinkWrap.create(JavaArchive.class)
            .addClasses(A.class, B.class, Bean.class)
            .addAsServiceProvider(Extension.class, TestExtension.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    @Test
    public void test() {
    }
}
{code}

The lifecycle observer method is called.


> ProcessInjectionPoint observer is resolved for declared injection points with parent class
> ------------------------------------------------------------------------------------------
>
>                 Key: OWB-1102
>                 URL: https://issues.apache.org/jira/browse/OWB-1102
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Lifecycle
>    Affects Versions: 1.6.2
>            Reporter: Antonin Stefanutti
>
> In the following test case:
> {code}
> class A {}
> class B extends A {}
> class Bean {
>     @Inject A a;
> }
> public class TestExtension implements Extension {
>     void test(@Observes ProcessInjectionPoint<?, B> pip) {
>     }
> }
> @RunWith(Arquillian.class)
> public class OwbTest {
>     @Deployment
>     public static Archive<?> deployment() {
>         return ShrinkWrap.create(JavaArchive.class)
>             .addClasses(A.class, B.class, Bean.class)
>             .addAsServiceProvider(Extension.class, TestExtension.class)
>             .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
>     }
>     @Test
>     public void test() {
>     }
> }
> {code}
> The lifecycle observer method is called.



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