You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jay Sartoris (JIRA)" <de...@myfaces.apache.org> on 2015/06/23 14:23:01 UTC

[jira] [Updated] (MYFACES-4000) Some MyFaces JSF 2.2 API signatures do not match the Java EE 7 API

     [ https://issues.apache.org/jira/browse/MYFACES-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Sartoris updated MYFACES-4000:
----------------------------------
    Status: Patch Available  (was: Open)

> Some MyFaces JSF 2.2 API signatures do not match the Java EE 7 API
> ------------------------------------------------------------------
>
>                 Key: MYFACES-4000
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4000
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-344
>    Affects Versions: 2.2.8
>            Reporter: Jay Sartoris
>
> There are several MyFaces 2.2 API classes in which their signatures do not fully match what is specified in Java EE 7 JSF API.  For reference, the comparison is based from Oracle's Java EE 7 API at: http://docs.oracle.com/javaee/7/api/index.html
> The issues we found are noted below.  They are broken down by package.
> h4. package javax.faces.application
> +In class:+
> javax.faces.application.ApplicationWrapper (http://docs.oracle.com/javaee/7/api/javax/faces/application/ApplicationWrapper.html)
> +The following methods have been deprecated and should have the @Deprecated annotation however they are missing in the current MyFaces API:+
> - createComponent(ValueBinding componentBinding, FacesContext context, String componentType)
> - createMethodBinding(String ref, Class<?>[] params)
> - evaluateExpressionGet(FacesContext context, String expression, Class<? extends T> expectedType)
> - getPropertyResolver()
> - getVariableResolver()
> - setPropertyResolver(PropertyResolver resolver)
> - setVariableResolver(VariableResolver resolver)
> +In class:+
> javax.faces.application.StateManager (http://docs.oracle.com/javaee/7/api/javax/faces/application/StateManager.html)
> +The following methods have been deprecated and should have the @Deprecated annotation:+
> - saveView(FacesContext context)
> - restoreView(FacesContext context, String viewId, String renderKitId)
> h4. package javax.faces.bean
> +The following classes have the @Documented annotation specified when they should not:+
> - javax.faces.bean.ApplicationScoped
> - javax.faces.bean.CustomScoped
> - javax.faces.bean.ManagedBean
> - javax.faces.bean.ManagedProperty
> - javax.faces.bean.ManagedProperty
> - javax.faces.bean.NoneScoped
> - javax.faces.bean.ReferencedBean
> - javax.faces.bean.RequestScoped
> - javax.faces.bean.SessionScoped
> - javax.faces.bean.ViewScoped
> +In class:+
> javax.faces.bean.ManagedProperty (http://docs.oracle.com/javaee/7/api/javax/faces/bean/ManagedProperty.html)
> The @Type annotation specifies both FIELD and METHOD element types, however, it should only be TYPE.  For example:
> @Target(ElementType.FIELD)
> +In class:+
> javax.faces.bean.CustomScoped (http://docs.oracle.com/javaee/7/api/javax/faces/bean/CustomScoped.html)
> The value() method specifies a default value of "", however the API documentation does not state that this method has a default value.
> h4. package javax.faces.component
> +In class:+
> javax.faces.component.UIComponent (http://docs.oracle.com/javaee/7/api/javax/faces/component/UIComponent.html)
> MyFaces currently lists the getPassThroughAttributes(boolean create) method as abstract, however the API documentation does not state that.  I propose that this method return an empty Map.  Something like this:
> {code}
> public Map<String,Object> getPassThroughAttributes(boolean create)
> {
>    return Collections.emptyMap();
> }
> {code}
> +In class:+
> javax.faces.component.UIViewAction (http://docs.oracle.com/javaee/7/api/javax/faces/component/UIViewAction.html)
> +The following two methods are not listed in the API documentation and should be removed:+
> - setValue(java.lang.Object)
> - getValue()
> +The following four methods are deprecated and need to have the @Deprecated annotation added:+
> - getAction()
> - getActionListener()
> - setAction(javax.faces.el.MethodBinding)
> - setActionListener(javax.faces.el.MethodBinding)
> h4. package javax.faces.el 
> +The following classes are listed as deprecated, however the API documentation does not state that they are.  The @Deprecated annotation should be removed from the class level for the following classes:+
> - javax.faces.el.EvaluationException
> - javax.faces.el.MethodBinding
> - javax.faces.el.MethodNotFoundException
> - javax.faces.el.PropertyNotFoundException
> - javax.faces.el.PropertyResolver
> - javax.faces.el.ReferenceSyntaxException
> - javax.faces.el.ValueBinding
> - javax.faces.el.VariableResolver
> h4. package javax.faces.validator
> +In class:+
> javax.faces.validator.FacesValidator ( http://docs.oracle.com/javaee/7/api/javax/faces/validator/FacesValidator.html )
> the value() method does not have a default value, however the API documentation states that it should have a default value of an empty String ("").
> h4. package javax.faces.facelets
> The class javax.faces.view.facelets.ResourceResolver should be deprecated (add @Deprecated at the class level) per the API documentation at http://docs.oracle.com/javaee/7/api/javax/faces/view/facelets/ResourceResolver.html
> h4. package javax.faces.webapp
> The following classes are not entirely deprecated and their @Deprecated annotation should be removed from the MyFaces API:
> - javax.faces.webapp.AttributeTag
> - javax.faces.webapp.ConverterTag
> - javax.faces.webapp.UIComponentBodyTag
> - javax.faces.webapp.UIComponentTag
> - javax.faces.webapp.ValidatorTag
> +In the class:+
> javax.faces.webapp.UIComponentTagBase (http://docs.oracle.com/javaee/7/api/javax/faces/webapp/UIComponentTagBase.html)
> The log field should be marked final per the API documentation (http://docs.oracle.com/javaee/7/api/javax/faces/webapp/UIComponentTagBase.html#log), however it is not in the MyFaces API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)