[seam-issues] [JBoss JIRA] Created: (SEAMCATCH-39) @Handles parameter should be permitted in any parameter position

Dan Allen (JIRA) jira-events at lists.jboss.org
Tue Jan 4 03:40:18 EST 2011


@Handles parameter should be permitted in any parameter position
----------------------------------------------------------------

                 Key: SEAMCATCH-39
                 URL: https://issues.jboss.org/browse/SEAMCATCH-39
             Project: Seam Catch
          Issue Type: Bug
          Components: Core Implementation
    Affects Versions: 3.0.0.Alpha3
            Reporter: Dan Allen
            Assignee: Jason Porter
             Fix For: 3.0.0.Alpha4


To be consist with CDI observers, the @Handles parameter should be allowed to be used in any position in the list of method arguments. The only restriction is that there is exactly one parameter annotated with @Handles (and it must be of type CaughtException).

Here is the relevant section on observer methods for reference:

"10.4.2. Declaring an observer method

An observer method may be declared by annotating a parameter @javax.enterprise.event.Observes. That parameter is the event parameter. The declared type of the parameter is the observed event type. If a method has more than one parameter annotated @Observes, the container automatically detects the problem and treats
it as a definition error."

So we should allow:

public void handle(BeanManager, @Handles CaughtException<Exception> ex) {}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list