Skip to content

Commit

Permalink
WELD-218
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Nov 3, 2009
1 parent 55d564a commit 1a35ecd
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
Expand Up @@ -18,7 +18,6 @@

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -122,28 +121,6 @@ private void checkObserverMethod()
{
throw new DefinitionException(this + " is invalid because it contains more than event parameter annotated @Observes");
}
// Make sure the event object above is not parameterized with a type
// variable or wildcard
if (eventObjects.size() > 0)
{
WeldParameter<?, ?> eventParam = eventObjects.iterator().next();
if (eventParam.isParameterizedType())
{
for (Type type : eventParam.getActualTypeArguments())
{
if (type instanceof TypeVariable<?>)
{
throw new DefinitionException("Cannot use a type variable " + type + " in an parameterized type " + toString());
}
// else if (type instanceof WildcardType)
// {
// throw new
// DefinitionException("Cannot use a wildcard variable " + type +
// " in an parameterized type " + toString());
// }
}
}
}
// Check for parameters annotated with @Disposes
List<WeldParameter<?, X>> disposeParams = this.observerMethod.getAnnotatedParameters(Disposes.class);
if (disposeParams.size() > 0)
Expand Down

0 comments on commit 1a35ecd

Please sign in to comment.