Skip to content

Commit

Permalink
WELD-425
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Feb 16, 2010
1 parent 0b2609c commit 3a4ab09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Expand Up @@ -62,6 +62,7 @@ public enum UtilMessage
@MessageId("000823") ERROR_INVOKING_METHOD,
@MessageId("000824") ACCESS_ERROR_ON_FIELD,
@MessageId("000825") NO_SUCH_METHOD,
@MessageId("000826") ANNOTATION_VALUES_INACCESSIBLE;
@MessageId("000826") ANNOTATION_VALUES_INACCESSIBLE,
@MessageId("000827") INITIALIZER_METHOD_IS_GENERIC;

}
5 changes: 5 additions & 0 deletions impl/src/main/java/org/jboss/weld/util/Beans.java
Expand Up @@ -30,6 +30,7 @@
import static org.jboss.weld.logging.messages.UtilMessage.INITIALIZER_CANNOT_BE_DISPOSAL_METHOD;
import static org.jboss.weld.logging.messages.UtilMessage.INITIALIZER_CANNOT_BE_OBSERVER;
import static org.jboss.weld.logging.messages.UtilMessage.INITIALIZER_CANNOT_BE_PRODUCER;
import static org.jboss.weld.logging.messages.UtilMessage.INITIALIZER_METHOD_IS_GENERIC;
import static org.jboss.weld.logging.messages.UtilMessage.INVALID_QUANTITY_INJECTABLE_FIELDS_AND_INITIALIZER_METHODS;
import static org.jboss.weld.logging.messages.UtilMessage.QUALIFIER_ON_FINAL_FIELD;
import static org.jboss.weld.logging.messages.UtilMessage.REDUNDANT_QUALIFIER;
Expand Down Expand Up @@ -407,6 +408,10 @@ else if (method.getWeldParameters(Observes.class).size() > 0)
{
throw new DefinitionException(INITIALIZER_CANNOT_BE_OBSERVER, method, type);
}
else if (method.getJavaMember().getTypeParameters().length > 0)
{
throw new DefinitionException(INITIALIZER_METHOD_IS_GENERIC, method, type);
}
else
{
if (!isOverridden(method, seenMethods))
Expand Down
Expand Up @@ -25,3 +25,4 @@ ERROR_INVOKING_METHOD=Error invoking method {0} on {1}
ACCESS_ERROR_ON_FIELD=Error getting field {0} on {1}
NO_SUCH_METHOD=Method {0} not implemented by instance {1}
ANNOTATION_VALUES_INACCESSIBLE=Cannot access values() on annotation
INITIALIZER_METHOD_IS_GENERIC=Initializer method {0} declared on {1} may not be a generic method

0 comments on commit 3a4ab09

Please sign in to comment.