You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2011/06/12 09:01:52 UTC
[jira] [Resolved] (OWB-585) ProcessSessionBean doesn't deal with
generic type quite right (CDITCK-215)
[ https://issues.apache.org/jira/browse/OWB-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks resolved OWB-585.
------------------------------
Resolution: Fixed
rev 1134736
> ProcessSessionBean doesn't deal with generic type quite right (CDITCK-215)
> --------------------------------------------------------------------------
>
> Key: OWB-585
> URL: https://issues.apache.org/jira/browse/OWB-585
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Events
> Affects Versions: 1.1.1
> Reporter: David Jencks
> Assignee: David Jencks
> Fix For: 1.1.1
>
>
> As discussed in CDITCK-215, there's something odd in ProcessSessionBean:
> ProcessSessionBean<X> extends ProcessManagedBean<Object>
> So, a ProcessSessionBean<Elephant> is not a ProcessManagedBean<Elephant> but a ProcessManagedBean<Object>. So the generic type parameter depends on which event type you are considering the event as.
> To solve this I've modified GenericBeanEvent.getBeanClass() to
> public Class<?> getBeanClassFor(Class<?> eventClass);
> where you can pass in the type of the event you are thinking about. The implementations are unchanged except for GProcessSessionBean where it's now:
> public Class<?> getBeanClassFor(Class<?> eventClass)
> {
> if (ProcessSessionBean.class.isAssignableFrom(eventClass))
> {
> return getBean().getBeanClass();
> }
> else
> {
> return Object.class;
> }
> }
> I also corrected the type parameter in
> public class ProcessSessionBeanImpl<X> extends ProcessBeanImpl<Object> implements ProcessSessionBean<X>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira