Author: pete.muir(a)jboss.org
Date: 2009-10-30 08:24:20 -0400 (Fri, 30 Oct 2009)
New Revision: 4440
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/observer/ObserverTest.java
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/resolve/ResolveEventObserversTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java
Log:
WELD-217, part 1
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 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -111,7 +111,7 @@
public void testNonStaticObserverMethodNotInherited()
{
Egg egg = new Egg();
- Set<ObserverMethod<?, Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
+ Set<ObserverMethod<Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
assert observers.size() == 1;
// Reception the observer so we can confirm that it
@@ -129,7 +129,7 @@
public void testNonStaticObserverMethodNotIndirectlyInherited()
{
StockPrice price = new StockPrice();
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(price);
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(price);
assert observers.size() == 1;
// Reception the observer so we can confirm that it
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/ObserverTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/ObserverTest.java 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/ObserverTest.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -52,9 +52,9 @@
@SpecAssertion(section = "11.1.3", id = "b")
public void testGetBeanOnObserverMethod()
{
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
assert observers.size() == 1;
- ObserverMethod<?, StockPrice> observerMethod = observers.iterator().next();
+ ObserverMethod<StockPrice> observerMethod = observers.iterator().next();
assert observerMethod.getBeanClass().equals(StockWatcher.class);
}
@@ -62,9 +62,9 @@
@SpecAssertion(section = "11.1.3", id = "c")
public void testGetObservedTypeOnObserverMethod()
{
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
assert observers.size() == 1;
- ObserverMethod<?, ?> observerMethod = observers.iterator().next();
+ ObserverMethod<?> observerMethod = observers.iterator().next();
assert observerMethod.getObservedType().equals(StockPrice.class);
}
@@ -72,9 +72,9 @@
@SpecAssertion(section = "11.1.3", id = "c")
public void testGetObservedBindingsOnObserverMethod()
{
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
assert observers.size() == 1;
- ObserverMethod<?, ?> observerMethod = observers.iterator().next();
+ ObserverMethod<?> observerMethod = observers.iterator().next();
assert observerMethod.getObservedQualifiers().size() == 1;
assert observerMethod.getObservedQualifiers().contains(new DefaultLiteral());
}
@@ -83,11 +83,11 @@
@SpecAssertion(section = "11.1.3", id = "d")
public void testGetNotifyOnObserverMethod()
{
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
assert observers.size() == 1;
assert observers.iterator().next().getReception().equals(Reception.ALWAYS);
- Set<ObserverMethod<?, ConditionalEvent>> conditionalObservers =
getCurrentManager().resolveObserverMethods(new ConditionalEvent());
+ Set<ObserverMethod<ConditionalEvent>> conditionalObservers =
getCurrentManager().resolveObserverMethods(new ConditionalEvent());
assert !conditionalObservers.isEmpty();
assert
conditionalObservers.iterator().next().getReception().equals(Reception.IF_EXISTS);
}
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 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/enterprise/EnterpriseEventInheritenceTest.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -29,7 +29,7 @@
public void testNonStaticObserverMethodNotInherited() throws Exception
{
Egg egg = new Egg();
- Set<ObserverMethod<?, Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
+ Set<ObserverMethod<Egg>> observers =
getCurrentManager().resolveObserverMethods(egg);
assert observers.size() == 1;
// Reception the observer so we can confirm that it
@@ -44,7 +44,7 @@
public void testNonStaticObserverMethodNotIndirectlyInherited() throws Exception
{
StockPrice stockPrice = new StockPrice();
- Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(stockPrice);
+ Set<ObserverMethod<StockPrice>> observers =
getCurrentManager().resolveObserverMethods(stockPrice);
assert observers.size() == 1;
// Reception the observer so we can confirm that it
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/resolve/ResolveEventObserversTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/resolve/ResolveEventObserversTest.java 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/observer/resolve/ResolveEventObserversTest.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -40,9 +40,9 @@
@SpecAssertion(section = "10.4.2", id = "a")
public void testMethodWithParameterAnnotatedWithObservesRegistersObserverMethod()
throws SecurityException, NoSuchMethodException
{
- Set<ObserverMethod<?, Temperature>> temperatureObservers =
getCurrentManager().resolveObserverMethods(new Temperature(0d));
+ Set<ObserverMethod<Temperature>> temperatureObservers =
getCurrentManager().resolveObserverMethods(new Temperature(0d));
assert temperatureObservers.size() == 1;
- ObserverMethod<?, Temperature> temperatureObserver =
temperatureObservers.iterator().next();
+ ObserverMethod<Temperature> temperatureObserver =
temperatureObservers.iterator().next();
assert temperatureObserver.getBeanClass().equals(AirConditioner.class);
assert temperatureObserver.getObservedType().equals(Temperature.class);
@@ -103,12 +103,12 @@
@SpecAssertion(section = "12.3", id = "o")
public void testObserverMethodNotAutomaticallyRegisteredForDisabledBeans()
{
- Set<ObserverMethod<?, Ghost>> ghostObservers =
getCurrentManager().resolveObserverMethods(new Ghost());
+ Set<ObserverMethod<Ghost>> ghostObservers =
getCurrentManager().resolveObserverMethods(new Ghost());
assert ghostObservers.size() == 0;
- Set<ObserverMethod<?, String>> stringObservers =
getCurrentManager().resolveObserverMethods(new String(), new
AnnotationLiteral<Secret>() {});
+ Set<ObserverMethod<String>> stringObservers =
getCurrentManager().resolveObserverMethods(new String(), new
AnnotationLiteral<Secret>() {});
assert stringObservers.size() == 1;
- for (ObserverMethod<?, String> observer : stringObservers)
+ for (ObserverMethod<String> observer : stringObservers)
{
// an assertion error will be raised if an inappropriate observer is called
observer.notify("fail if disabled observer invoked");
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/resolve/nonbinding/NonBindingTypesWhenResolvingTest.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -33,6 +33,6 @@
@SpecAssertion(section = "11.3.11", id = "e")
public void testNonBindingTypeAnnotationWhenResolvingFails()
{
- Set<ObserverMethod<?, AnEventType>> resolvedObservers =
getCurrentManager().resolveObserverMethods(new AnEventType(), new
AnimalStereotypeAnnotationLiteral());
+ Set<ObserverMethod<AnEventType>> resolvedObservers =
getCurrentManager().resolveObserverMethods(new AnEventType(), new
AnimalStereotypeAnnotationLiteral());
}
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java 2009-10-30
12:24:08 UTC (rev 4439)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/extensions/observer/ProcessObserverMethodObserver.java 2009-10-30
12:24:20 UTC (rev 4440)
@@ -13,7 +13,7 @@
{
private static final HashSet<Type> eventTypes = new HashSet<Type>();
private static AnnotatedMethod<?> annotatedMethod;
- private static ObserverMethod<?, ?> observerMethod;
+ private static ObserverMethod<?> observerMethod;
public void observeObserverMethodForEventA(@Observes
ProcessObserverMethod<EventAObserver, EventA> event)
{
@@ -32,7 +32,7 @@
return annotatedMethod;
}
- public static ObserverMethod<?, ?> getObserverMethod()
+ public static ObserverMethod<?> getObserverMethod()
{
return observerMethod;
}