[jbosstools-issues] [JBoss JIRA] (JBIDE-21113) Incorrect JSF Phase Listener Warning

Cody Lerum (JIRA) issues at jboss.org
Thu Nov 19 15:10:00 EST 2015


     [ https://issues.jboss.org/browse/JBIDE-21113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cody Lerum updated JBIDE-21113:
-------------------------------
    Description: 
When adding a JSF phase listener to faces-config.xml

{code}
<lifecycle>
   <phase-listener>com.demo.web.jsf.JsfCdiPhaseListener</phase-listener>
</lifecycle>
{code}

You are presented a warning that {{phase-listener references to "com.demo.web.jsf.JsfCdiPhaseListener" that does not extend javax.faces.event.PhaseListener}}

In reality you cannot extend javax.faces.event.PhaseListener you must implement it. So this check should be looking for implements rather than extends. See http://balusc.omnifaces.org/2006/09/debug-jsf-lifecycle.html

In java 8 at least you get a compiler error if you try and extend avax.faces.event.PhaseListener.

The type PhaseListener cannot be the superclass of JsfCdiPhaseListener; a superclass must be a class

  was:
When adding a JSF phase listener to faces-config.xml

{code}
<lifecycle>
   <phase-listener>com.demo.web.jsf.JsfCdiPhaseListener</phase-listener>
</lifecycle>
{code}

You are presented a warning that {{phase-listener references to "com.demo.web.jsf.JsfCdiPhaseListener" that does not extend javax.faces.event.PhaseListener}}

In reality you cannot extend javax.faces.event.PhaseListener you must implement it. So this check should be looking for implements rather than extends. See http://balusc.omnifaces.org/2006/09/debug-jsf-lifecycle.html



> Incorrect JSF Phase Listener Warning
> ------------------------------------
>
>                 Key: JBIDE-21113
>                 URL: https://issues.jboss.org/browse/JBIDE-21113
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: jsf
>    Affects Versions: 4.3.0.Final
>         Environment: Mars.1
> Java 8
>            Reporter: Cody Lerum
>
> When adding a JSF phase listener to faces-config.xml
> {code}
> <lifecycle>
>    <phase-listener>com.demo.web.jsf.JsfCdiPhaseListener</phase-listener>
> </lifecycle>
> {code}
> You are presented a warning that {{phase-listener references to "com.demo.web.jsf.JsfCdiPhaseListener" that does not extend javax.faces.event.PhaseListener}}
> In reality you cannot extend javax.faces.event.PhaseListener you must implement it. So this check should be looking for implements rather than extends. See http://balusc.omnifaces.org/2006/09/debug-jsf-lifecycle.html
> In java 8 at least you get a compiler error if you try and extend avax.faces.event.PhaseListener.
> The type PhaseListener cannot be the superclass of JsfCdiPhaseListener; a superclass must be a class



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list