Author: pete.muir(a)jboss.org
Date: 2010-12-07 12:53:33 -0500 (Tue, 07 Dec 2010)
New Revision: 7119
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
CDITCK-184
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractJSR299Test.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -16,16 +16,13 @@
*/
package org.jboss.jsr299.tck;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
@@ -123,7 +120,7 @@
return typeList.size() == 0;
}
- public boolean typeSetMatches(Set<Type> types, Type... requiredTypes)
+ public boolean typeSetMatches(Collection<? extends Type> types, Type...
requiredTypes)
{
List<Type> typeList = Arrays.asList(requiredTypes);
return requiredTypes.length == types.size() &&
types.containsAll(typeList);
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -17,11 +17,9 @@
package org.jboss.jsr299.tck.tests.event;
import java.util.ArrayList;
-import java.util.Set;
import javax.enterprise.context.spi.Context;
import javax.enterprise.event.TransactionPhase;
-import javax.enterprise.inject.spi.ObserverMethod;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
@@ -126,17 +124,11 @@
*/
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "dc")
- public void testNonStaticObserverMethodNotInherited()
+ public void testNonStaticObserverMethodInherited()
{
Egg egg = new Egg();
- Set<ObserverMethod<? super Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on Farmer, and not LazyFarmer
- observers.iterator().next().notify(egg);
- assert egg.getClassesVisited().size() == 1;
- assert egg.getClassesVisited().iterator().next().equals(Farmer.class);
+ getCurrentManager().fireEvent(egg);
+ assert typeSetMatches(egg.getClassesVisited(), Farmer.class, LazyFarmer.class);
}
@Test(groups = { "events", "inheritance" })
@@ -144,18 +136,11 @@
@SpecAssertion(section = "4.2", id = "di"),
@SpecAssertion(section = "11.1.3", id = "f")
})
- public void testNonStaticObserverMethodNotIndirectlyInherited()
+ public void testNonStaticObserverMethodIndirectlyInherited()
{
StockPrice price = new StockPrice();
- Set<ObserverMethod<? super StockPrice>> observers =
getCurrentManager().resolveObserverMethods(price);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on StockWatcher, and not IntermediateStockWatcher
- // or IndirectStockWatcher
- observers.iterator().next().notify(price);
- assert price.getClassesVisited().size() == 1;
- assert price.getClassesVisited().iterator().next().equals(StockWatcher.class);
+ getCurrentManager().fireEvent(price);
+ assert typeSetMatches(price.getClassesVisited(), StockWatcher.class,
IntermediateStockWatcher.class, IndirectStockWatcher.class);
}
@Test(groups = { "events" })
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Farmer.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -18,19 +18,12 @@
import javax.enterprise.event.Observes;
-class Farmer
+public class Farmer
{
- private static Class<?> observerClazz;
public void observeEggLaying(@Observes Egg egg)
{
- observerClazz = this.getClass();
egg.recordVisit(this);
}
-
- public static Class<?> getObserverClazz()
- {
- return observerClazz;
- }
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -17,36 +17,12 @@
package org.jboss.jsr299.tck.tests.event;
import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Any;
class StockWatcher
{
- private static Class<?> observerClazz;
- private static boolean anyVolumeObserved = false;
public void observeStockPrice(@Observes StockPrice price)
{
- observerClazz = this.getClass();
price.recordVisit(this);
}
-
- public void observeAllVolume(@Observes @Any Volume volume)
- {
- anyVolumeObserved = true;
- }
-
- public static Class<?> getObserverClazz()
- {
- return observerClazz;
- }
-
- public static boolean isAnyVolumeObserved()
- {
- return anyVolumeObserved;
- }
-
- public static void setAnyVolumeObserved(boolean anyStockPriceObserved)
- {
- StockWatcher.anyVolumeObserved = anyStockPriceObserved;
- }
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -19,7 +19,7 @@
import javax.ejb.Local;
@Local
-interface Terrier
+public interface Terrier
{
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2010-12-07
17:49:20 UTC (rev 7118)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2010-12-07
17:53:33 UTC (rev 7119)
@@ -16,10 +16,6 @@
*/
package org.jboss.jsr299.tck.tests.event.observer.enterprise;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.ObserverMethod;
-
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecVersion;
@@ -42,31 +38,19 @@
{
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "df")
- public void testNonStaticObserverMethodNotInherited() throws Exception
+ public void testNonStaticObserverMethodInherited() throws Exception
{
Egg egg = new Egg();
- Set<ObserverMethod<? super Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on Farmer, and not LazyFarmer
- observers.iterator().next().notify(egg);
- assert egg.getClassesVisited().size() == 1;
- assert
FarmerLocal.class.isAssignableFrom(egg.getClassesVisited().iterator().next());
+ getCurrentManager().fireEvent(egg);
+ assert typeSetMatches(egg.getClassesVisited(), Farmer.class, LazyFarmer.class);
}
@Test(groups = { "events", "inheritance" })
@SpecAssertion(section = "4.2", id = "dl")
- public void testNonStaticObserverMethodNotIndirectlyInherited() throws Exception
+ public void testNonStaticObserverMethodIndirectlyInherited() throws Exception
{
StockPrice stockPrice = new StockPrice();
- Set<ObserverMethod<? super StockPrice>> observers =
getCurrentManager().resolveObserverMethods(stockPrice);
- assert observers.size() == 1;
-
- // Reception the observer so we can confirm that it
- // is a method only on StockWatcher, and not IndirectStockWatcher
- observers.iterator().next().notify(stockPrice);
- assert stockPrice.getClassesVisited().size() == 1;
- assert
StockWatcherLocal.class.isAssignableFrom(stockPrice.getClassesVisited().iterator().next());
+ getCurrentManager().fireEvent(stockPrice);
+ assert typeSetMatches(stockPrice.getClassesVisited(), StockWatcher.class,
IndirectStockWatcher.class, IntermediateStockWatcher.class);
}
}
Modified: cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-12-07 17:49:20 UTC (rev
7118)
+++ cdi-tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2010-12-07 17:53:33 UTC (rev
7119)
@@ -1851,133 +1851,193 @@
</section>
- <section id="4.2" title="Inheritance of member-level
metadata">
+ <section id="4.2" title="Inheritance of member-level
metadata">
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class
of a managed bean or session bean Y. If X declares an injected field x then Y inherits
x.</text>
+
+ <assertion id="aa">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ </assertion>
- <assertion id="aa">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="ac">
+ <text>Check managed bean X _indirectly_ extends managed bean
Y</text>
+ </assertion>
+
+ <assertion id="ab">
+ <text>Check session bean X _directly_ extends session bean Y</text>
+ </assertion>
- <assertion id="ab">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="ad">
+ <text>Check session bean X _indirectly_ extends session bean
Y</text>
+ </assertion>
+ </group>
- <assertion id="ac">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class
of a managed bean or session bean Y. If X declares an initializer, non-static observer,
@PostConstruct or @PreDestroy method x() then Y inherits x() if and only if neither Y nor
any intermediate class that is a subclass of X and a superclass of Y overrides the method
x().</text>
+
+ <assertion id="baa">
+ <text>Check managed bean X _directly_ extends managed bean Y with
_|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bab">
+ <text>Check session bean X _directly_ extends session bean Y with
_|@PostConstruct|_</text>
+ </assertion>
- <assertion id="ad">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares an injected field x then Y inherits x.</text>
- </assertion>
+ <assertion id="bac">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with
_|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bad">
+ <text>Check session bean X _indirectly_ extends session bean Y with
_|@PostConstruct|_</text>
+ </assertion>
+
+ <assertion id="bba">
+ <text>Check managed bean X _directly_ extends managed bean Y with
_|@PostDestroy|_</text>
+ </assertion>
- <assertion id="baa">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and
only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="bbb">
+ <text>Check session bean X _directly_ extends session bean Y with
_|@PostDestroy|_</text>
+ </assertion>
+
+ <assertion id="bbc">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with
_|@PostDestroy|_</text>
+ </assertion>
- <assertion id="bab">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and
only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="bbd">
+ <text>Check session bean X _indirectly_ extends session bean Y with
_|@PostDestroy|_</text>
+ </assertion>
+
+ <assertion id="dc">
+ <text>Check managed bean X _directly_ extends managed bean Y with a
_non-static observer method_</text>
+ </assertion>
- <assertion id="bac">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y
overrides the method x()</text>
- </assertion>
+ <assertion id="df">
+ <text>Check session bean X _directly_ extends session bean Y with a
_non-static observer method_</text>
+ </assertion>
+
+ <assertion id="di">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a
_non-static observer method_</text>
+ </assertion>
+
+ <assertion id="dl">
+ <text>Check session bean X _indirectly_ extends session bean Y with a
_non-static observer method_</text>
+ </assertion>
+
+ <assertion id="dm">
+ <text>Check managed bean X _directly_ extends managed bean Y with a
_initializer method_</text>
+ </assertion>
- <assertion id="bad">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares a _|@PostConstruct|_ method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y
overrides the method x()</text>
- </assertion>
+ <assertion id="dn">
+ <text>Check session bean X _directly_ extends session bean Y with a
_initializer method_</text>
+ </assertion>
+
+ <assertion id="do">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a
_initializer method_</text>
+ </assertion>
+
+ <assertion id="dp">
+ <text>Check session bean X _indirectly_ extends session bean Y with a
_initializer method_</text>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class
of a managed bean or session bean Y. If X declares a non-static method x() annotated with
an interceptor binding type Z then Y inherits the binding if and only if neither Y nor any
intermediate class that is a subclass of X and a superclass of Y overrides the method
x().</text>
+
+ <assertion id="ka">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ </assertion>
- <assertion id="bba">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and
only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="kb">
+ <text>Check session bean X _directly_ extends session bean Y</text>
+ </assertion>
+
+ <assertion id="kc">
+ <text>Check managed bean X _indirectly_ extends managed bean
Y</text>
+ </assertion>
+
+ <assertion id="kd">
+ <text>Check session bean X _indirectly_ extends session bean
Y</text>
+ </assertion>
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class
of a managed bean or session bean Y .If X declares a non-static producer or disposer
method x() then Y does not inherit this method.</text>
+
+ <assertion id="da">
+ <text>Check managed bean X _directly_ extends managed bean Y with a
_non-static producer method_</text>
+ </assertion>
- <assertion id="bbb">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and
only if Y does not override the method x()</text>
- </assertion>
+ <assertion id="db">
+ <text>Check managed bean X _directly_ extends managed bean Y with a
_non-static disposer method_</text>
+ </assertion>
- <assertion id="bbc">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y
overrides the method x()</text>
- </assertion>
+ <assertion id="dd">
+ <text>Check session bean X _directly_ extends session bean Y with a
_non-static producer method_</text>
+ </assertion>
- <assertion id="bbd">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares a _|@PreDestroy|_ method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y
overrides the method x()</text>
- </assertion>
+ <assertion id="de">
+ <text>Check session bean X _directly_ extends session bean Y with a
_non-static disposer method_</text>
+ </assertion>
- <assertion id="da">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dg">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a
_non-static producer method_</text>
+ </assertion>
- <assertion id="db">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dh">
+ <text>Check managed bean X _indirectly_ extends managed bean Y with a
_non-static disposer method_</text>
+ </assertion>
- <assertion id="dc">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dj">
+ <text>Check session bean X _indirectly_ extends session bean Y with a
_non-static producer method_</text>
+ </assertion>
- <assertion id="dd">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="dk">
+ <text>Check session bean X _indirectly_ extends session bean Y with a
_non-static disposer method_</text>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>Suppose a class X is extended directly or indirectly by the bean class
of a managed bean or session bean Y. If X declares a non-static producer field x then Y
does not inherit this field.</text>
+
+ <assertion id="ea">
+ <text>Check managed bean X _directly_ extends managed bean Y</text>
+ <note>We don't test session beans, as they can't have non-static
producer fields</note>
+ </assertion>
- <assertion id="de">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="ec">
+ <text>Check managed bean X _indirectly_ extends managed bean
Y</text>
+ <note>We don't test session beans, as they can't have non-static
producer fields</note>
+ </assertion>
+
+ </group>
+
+ <group>
+ <text>If X is a generic type, and an injection point, producer method,
producer field, disposer method or observer method declared by X is inherited by Y, and
the declared type of the injection point, producer method, producer field, disposed para-
meter or event parameter contains type variables declared by X, the type of the injection
point, producer method, producer field, disposed parameter or event parameter inherited in
Y is the declared type, after substitution of actual type arguments declared by Y or any
intermediate class that is a subclass of X and a superclass of Y.</text>
+
+ <assertion id="f">
+ <text>Check injection point</text>
+ </assertion>
- <assertion id="df">
- <text>For class X which is extended _directly_ by the bean class of a
_session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="g">
+ <text>Check producer method</text>
+ </assertion>
- <assertion id="dg">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="h">
+ <text>Check producer field</text>
+ </assertion>
- <assertion id="dh">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="i">
+ <text>Check disposer method</text>
+ </assertion>
- <assertion id="di">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
+ <assertion id="j">
+ <text>check observer method</text>
+ </assertion>
+ </group>
- <assertion id="dj">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares a _non-static producer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="dk">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares a _non-static disposer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="dl">
- <text>For class X which is extended _indirectly_ by the bean class of a
_session_ bean Y, if X declares a _non-static observer method_ x() then Y does not inherit
this method unless Y is explicitly declared to specialize X</text>
- </assertion>
-
- <assertion id="ea">
- <text>For class X which is extended _directly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit
this field unless Y is explicitly declared to specialize X.</text>
- <note>We don't test session beans, as they can't have non-static
producer fields</note>
- </assertion>
-
- <assertion id="ec">
- <text>For class X which is extended _indirectly_ by the bean class of a
_managed_ bean Y, if X declares a _non-static producer field_ x then Y does not inherit
this field unless Y is explicitly declared to specialize X.</text>
- <note>We don't test session beans, as they can't have non-static
producer fields</note>
- </assertion>
-
- <assertion id="f">
- <text>If X is a generic type, and an injection point declared by X is
inherited by Y, and the declared type of the injection point contains type variables
declared by X, the type of the injection point inherited in Y is the declared type, after
substitution of actual type arguments declared by Y or any intermediate class that is a
subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="g">
- <text>If X is a generic type, and a producer method declared by X is
inherited by Y, and the declared type of the producer method contains type variables
declared by X, the type of the producer method inherited in Y is the declared type, after
substitution of actual type arguments declared by Y or any intermediate class that is a
subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="h">
- <text>If X is a generic type, and a producer field declared by X is inherited
by Y, and the declared type of the producer field contains type variables declared by X,
the type of the producer field inherited in Y is the declared type, after substitution of
actual type arguments declared by Y or any intermediate class that is a subclass of X and
a superclass of Y.</text>
- </assertion>
-
- <assertion id="i">
- <text>If X is a generic type, and a disposer method declared by X is
inherited by Y, and the declared type of the disposed parameter contains type variables
declared by X, the type of the disposed parameter inherited in Y is the declared type,
after substitution of actual type arguments declared by Y or any intermediate class that
is a subclass of X and a superclass of Y.</text>
- </assertion>
-
- <assertion id="j">
- <text>If X is a generic type, and an observer method declared by X is
inherited by Y, and the declared type of the event parameter contains type variables
declared by X, the type of the event parameter inherited in Y is the declared type, after
substitution of actual type arguments declared by Y or any intermediate class that is a
subclass of X and a superclass of Y.</text>
- </assertion>
</section>
<section id="4.3" title="Specialization">