Author: dallen6
Date: 2009-06-01 05:37:06 -0400 (Mon, 01 Jun 2009)
New Revision: 2739
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnyBinding.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FiresBinding.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/CommonWaxbill_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/FiresOnNonEventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/BlackRumpedWaxbill_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/FiresOnEventWithoutTypeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event3/GoldbreastWaxbill_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/FiresOnEventWithTypeVariableTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/JavaSparrow_Broken.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/AuroraFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/BlueFacedParrotFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/OrangeCheekedWaxbill.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
Log:
Removed the @Fires annotation from implicit Event bean injections
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/activities/current/Dusk.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -2,13 +2,13 @@
import javax.enterprise.inject.Initializer;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class Dusk
{
@Initializer
- public Dusk(@Fires Event<NightTime> event)
+ public Dusk(@Any Event<NightTime> event)
{
event.fire(new NightTime());
}
Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnyBinding.java
(from rev 2712,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FiresBinding.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnyBinding.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/AnyBinding.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.event;
+
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.Any;
+
+public class AnyBinding extends AnnotationLiteral<Any> implements Any
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -564,7 +564,7 @@
{
// Retrieve the implicit event bean from the manager only by
// its API type
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding());
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
assert !eventBeans.isEmpty();
}
@@ -583,7 +583,7 @@
{
// Retrieve the implicit event bean from the manager
// by its binding types (uses OrangeCheekedWaxbill)
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding(), new
TameAnnotationLiteral(), new RoleBinding("Admin"));
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding(), new
TameAnnotationLiteral(), new RoleBinding("Admin"));
assert !eventBeans.isEmpty();
}
@@ -602,7 +602,7 @@
{
// Retrieve the implicit event bean from the manager
// only by its API type (uses BlueFacedParrotFinch)
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding());
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getDeploymentType().equals(Standard.class);
@@ -622,7 +622,7 @@
{
// Retrieve the implicit event bean from the manager only
// by its API type (uses BlueFacedParrotFinch)
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding());
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getScopeType().equals(Dependent.class);
@@ -641,7 +641,7 @@
{
// Retrieve the implicit event bean from the manager only
// by its API type (uses BlueFacedParrotFinch)
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding());
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
assert eventBeans.size() == 1;
Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
assert eventBean.getName() == null;
@@ -660,7 +660,7 @@
{
// Retrieve the implicit event bean from the manager only
// by its API type (uses BlueFacedParrotFinch)
- Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new FiresBinding());
+ Set<?> eventBeans = getCurrentManager().getBeans(new
TypeLiteral<Event<AnEventType>>() {}, new AnyBinding());
assert eventBeans.size() == 1;
}
}.run();
Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FiresBinding.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FiresBinding.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/FiresBinding.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.event;
-
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.event.Fires;
-
-public class FiresBinding extends AnnotationLiteral<Fires> implements Fires
-{
-
-}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OrangeCheekedWaxbill.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,12 +1,12 @@
package org.jboss.jsr299.tck.tests.event;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class OrangeCheekedWaxbill
{
- @Fires @Role("Admin") @Tame
+ @Any @Role("Admin") @Tame
protected Event<String> simpleEvent;
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/OwlFinch_Broken.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,13 +1,13 @@
package org.jboss.jsr299.tck.tests.event;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
import javax.event.Observer;
class OwlFinch_Broken
{
- @Fires
+ @Any
private Event<String> simpleEvent;
public void methodThatFiresEvent()
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/SweeWaxbill.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,13 +1,13 @@
package org.jboss.jsr299.tck.tests.event;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
import javax.event.Observer;
class SweeWaxbill
{
- @Fires @Role("Admin")
+ @Any @Role("Admin")
private Event<String> simpleEvent;
public void methodThatFiresEvent()
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/CommonWaxbill_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/CommonWaxbill_Broken.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/CommonWaxbill_Broken.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -2,10 +2,10 @@
import java.util.ArrayList;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class CommonWaxbill_Broken
{
- @Fires
+ @Any
protected ArrayList<String> simpleEvent;
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/FiresOnNonEventTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/FiresOnNonEventTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event1/FiresOnNonEventTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -26,7 +26,7 @@
import org.testng.annotations.Test;
/**
- * Tests the use of @Fires on an injection point that is
+ * Tests the use of @Any on an injection point that is
* not an Event type.
*
* @author David Allen
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/BlackRumpedWaxbill_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/BlackRumpedWaxbill_Broken.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/BlackRumpedWaxbill_Broken.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,12 +1,12 @@
package org.jboss.jsr299.tck.tests.event.broken.event2;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class BlackRumpedWaxbill_Broken
{
@SuppressWarnings("unchecked")
- @Fires
+ @Any
private Event simpleEvent;
public void eliminateWarning()
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/FiresOnEventWithoutTypeTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/FiresOnEventWithoutTypeTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event2/FiresOnEventWithoutTypeTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -27,7 +27,7 @@
/**
* Tests if the Event object on an injection point annotated
- * @Fires has a type parameter for the actual type of event.
+ * @Any has a type parameter for the actual type of event.
*
* @author David Allen
*
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event3/GoldbreastWaxbill_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event3/GoldbreastWaxbill_Broken.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event3/GoldbreastWaxbill_Broken.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,11 +1,11 @@
package org.jboss.jsr299.tck.tests.event.broken.event3;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class GoldbreastWaxbill_Broken
{
- @Fires
+ @Any
private Event<?> simpleEvent;
public void eliminateWarning()
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/FiresOnEventWithTypeVariableTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/FiresOnEventWithTypeVariableTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/FiresOnEventWithTypeVariableTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -27,7 +27,7 @@
/**
* Tests an Event templated with a type variable and annotated
- * with @Fires fails.
+ * with @Any fails.
*
* @author David Allen
*
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/JavaSparrow_Broken.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/JavaSparrow_Broken.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/broken/event4/JavaSparrow_Broken.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -2,13 +2,13 @@
import javax.enterprise.inject.Produces;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
class JavaSparrow_Broken
{
@Produces
- public <T> void produce(@Fires Event<T> event)
+ public <T> void produce(@Any Event<T> event)
{
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/AuroraFinch.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/AuroraFinch.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/AuroraFinch.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -2,7 +2,7 @@
import javax.enterprise.inject.Initializer;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
import org.jboss.jsr299.tck.tests.event.register.fires1.StarFinch.Mess;
@@ -13,7 +13,7 @@
private Mess someMess;
@Initializer
- public AuroraFinch(@Fires Event<Mess> eventObject)
+ public AuroraFinch(@Any Event<Mess> eventObject)
{
// Create a new mess and fire the event for it
someMess = new Mess("smallMess");
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/BlueFacedParrotFinch.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/BlueFacedParrotFinch.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/BlueFacedParrotFinch.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,15 +1,15 @@
package org.jboss.jsr299.tck.tests.event.register.fires1;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
import javax.event.Observer;
class BlueFacedParrotFinch
{
- @Fires
+ @Any
protected Event<Integer> simpleEvent;
- @Fires @Tame
+ @Any @Tame
protected Event<String> simpleStringEvent;
public static boolean simpleStringEventObserved = false;
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/ImplicitEventBeanTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -29,7 +29,7 @@
import org.testng.annotations.Test;
/**
- * Tests proper functioning of the implicit event bean injected when @Fires is
+ * Tests proper functioning of the implicit event bean injected when @Any is
* used on an Event<T> type.
*
* @author David Allen
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/OrangeCheekedWaxbill.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/OrangeCheekedWaxbill.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/OrangeCheekedWaxbill.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -2,7 +2,7 @@
import javax.enterprise.inject.Initializer;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
import org.jboss.jsr299.tck.tests.event.register.fires1.StarFinch.Mess;
@@ -17,7 +17,7 @@
}
@Initializer
- public void theInitializerMethod(@Fires @Tame Event<Mess> eventObject)
+ public void theInitializerMethod(@Any @Tame Event<Mess> eventObject)
{
// Create a new mess and fire the event for it
someMess = new Mess("tameMess");
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/register/fires1/StarFinch.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -3,7 +3,7 @@
import javax.enterprise.inject.Named;
import javax.enterprise.inject.Produces;
import javax.event.Event;
-import javax.event.Fires;
+import javax.enterprise.inject.Any;
@Named("StarFinch")
public class StarFinch
@@ -21,7 +21,7 @@
}
@Produces @AnotherDeploymentType
- public Mess producerOfMesses(@Fires Event<Mess> messEvent)
+ public Mess producerOfMesses(@Any Event<Mess> messEvent)
{
Mess newMess = new Mess("bigMess");
messEvent.fire(newMess);
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-01
09:35:12 UTC (rev 2738)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/manager/ManagerTest.java 2009-06-01
09:37:06 UTC (rev 2739)
@@ -1,11 +1,11 @@
package org.jboss.jsr299.tck.tests.lookup.manager;
import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.Current;
import javax.enterprise.inject.deployment.Standard;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
import org.hibernate.tck.annotations.SpecAssertions;
@@ -66,7 +66,7 @@
public void testManagerBeanHasCurrentBinding()
{
Bean<BeanManager> beanManager =
getCurrentManager().getBeans(BeanManager.class).iterator().next();
- assert beanManager.getBindings().iterator().next() instanceof Current;
+ assert beanManager.getBindings().contains(new
AnnotationLiteral<Current>(){});
}
@Test