Skip to content

Commit

Permalink
WELD-565
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Aug 5, 2010
1 parent cdc096c commit ba11b4a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
Expand Up @@ -266,7 +266,7 @@ protected boolean ignore(T event)
@Override
public String toString()
{
return id;
return observerMethod.toString();
}

public String getId()
Expand Down
Expand Up @@ -45,7 +45,6 @@ public enum UtilMessage
@MessageId("000806") TOO_MANY_PRE_DESTROY_METHODS,
@MessageId("000807") INITIALIZER_CANNOT_BE_PRODUCER,
@MessageId("000808") INITIALIZER_CANNOT_BE_DISPOSAL_METHOD,
@MessageId("000809") INITIALIZER_CANNOT_BE_OBSERVER,
@MessageId("000810") QUALIFIER_ON_FINAL_FIELD,
@MessageId("000811") TOO_MANY_INITIALIZERS,
@MessageId("000812") AMBIGUOUS_CONSTRUCTOR,
Expand Down
4 changes: 2 additions & 2 deletions impl/src/main/java/org/jboss/weld/util/Beans.java
Expand Up @@ -25,10 +25,10 @@
import static org.jboss.weld.logging.messages.BeanMessage.FOUND_ONE_PRE_DESTROY_METHOD;
import static org.jboss.weld.logging.messages.BeanMessage.FOUND_POST_CONSTRUCT_METHODS;
import static org.jboss.weld.logging.messages.BeanMessage.FOUND_PRE_DESTROY_METHODS;
import static org.jboss.weld.logging.messages.EventMessage.INVALID_INITIALIZER;
import static org.jboss.weld.logging.messages.UtilMessage.AMBIGUOUS_CONSTRUCTOR;
import static org.jboss.weld.logging.messages.UtilMessage.ANNOTATION_NOT_QUALIFIER;
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;
Expand Down Expand Up @@ -408,7 +408,7 @@ else if (method.getWeldParameters(Disposes.class).size() > 0)
}
else if (method.getWeldParameters(Observes.class).size() > 0)
{
throw new DefinitionException(INITIALIZER_CANNOT_BE_OBSERVER, method, type);
throw new DefinitionException(INVALID_INITIALIZER, method);
}
else if (method.isGeneric())
{
Expand Down
Expand Up @@ -2,8 +2,8 @@ ASYNC_FIRE=Sending event {0} directly to observer {1}
ASYNC_TX_FIRE=Sending event {0} asynchronously to transactional observer {1}
ASYNC_OBSERVER_FAILURE=Failure while notifying an observer of event {0}
PROXY_REQUIRED=Proxy required
INVALID_SCOPED_CONDITIONAL_OBSERVER={0} is invalid because it is a conditional observer method and is declared by a @Dependent scoped bean
MULTIPLE_EVENT_PARAMETERS={0} is invalid because it contains more than one event parameter annotated @Observes
INVALID_DISPOSES_PARAMETER={0} cannot have any parameters annotated with @Disposes
INVALID_PRODUCER={0} cannot be annotated with @Produces
INVALID_INITIALIZER={0} cannot be annotated with @Initializer
INVALID_SCOPED_CONDITIONAL_OBSERVER=Conditional observer method [{0}] cannot be declared by a @Dependent scoped bean
MULTIPLE_EVENT_PARAMETERS=Observer method [{0}] cannot have more than one event parameter annotated @Observes
INVALID_DISPOSES_PARAMETER=Observer method [{0}] cannot have a parameter annotated with @Disposes
INVALID_PRODUCER=Observer method [{0}] cannot be annotated with @Produces
INVALID_INITIALIZER=Observer method [{0}] cannot be annotated with @Inject; observer methods are automatically injection points
Expand Up @@ -7,7 +7,6 @@ TOO_MANY_POST_CONSTRUCT_METHODS=Cannot have more than one post construct method
TOO_MANY_PRE_DESTROY_METHODS=Cannot have more than one pre destroy method annotated @PreDestroy for {0}
INITIALIZER_CANNOT_BE_PRODUCER=Initializer method {0} cannot be annotated @Produces on {1}
INITIALIZER_CANNOT_BE_DISPOSAL_METHOD=Initializer method {0} cannot have parameters annotated @Disposes on {1}
INITIALIZER_CANNOT_BE_OBSERVER=Initializer method {0} cannot be annotated @Observes on {1}
QUALIFIER_ON_FINAL_FIELD=Cannot place qualifiers on final fields: {0}
TOO_MANY_INITIALIZERS=Cannot have more than one constructor annotated with @Initializer for {0}
AMBIGUOUS_CONSTRUCTOR=Cannot determine constructor to use for {0}. Possible constructors {1}
Expand Down

0 comments on commit ba11b4a

Please sign in to comment.