[ https://issues.apache.org/jira/browse/MYFACES-4333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091981#comment-17091981 ]
Thomas Andraschko edited comment on MYFACES-4333 at 4/25/20, 12:00 AM: ----------------------------------------------------------------------- +1 for adding "2.3" in the IF in 2.3.x branch +1 for also adding "2.3" and "3.0" for in 3.0.x branch -0.5 to refactor the "version-IF" in this branches; master already was refactored and the IF doesnt exist anymore +1 for adding your patch to 2.2.x, 2.3.x, 3.0.x and master a GitHub PR would be great was (Author: tandraschko): +1 for adding "2.3" in the IF in 2.3.x branch +1 for also adding "2.3" and "3.0" for in 3.0.x branch -0.5 to refactor code this "version-IF" in this branches; master already was refactoring the IF doesnt exist anymore +1 for adding your patch to 2.2.x, 2.3.x, 3.0.x and master a GitHub PR would be great > ElContext#getFunctionMapper Returns NULL > ---------------------------------------- > > Key: MYFACES-4333 > URL: https://issues.apache.org/jira/browse/MYFACES-4333 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-344, JSR-372 > Affects Versions: 2.2.12, 2.3.6 > Reporter: Volodymyr Siedlecki > Priority: Minor > Attachments: JSF22-MyFaces-4333.patch, JSF23-MyFaces-4333-Fix.patch, > MYFACES-4333.zip > > > {color:#0e101a}Hello,{color} > {color:#0e101a}When retrieving the functionMapper from the ELContext, null is > returned.{color} > {code:java} > FacesContext facesContext = FacesContext.getCurrentInstance(); ELContext > elContext = facesContext.getELContext(); FunctionMapper functionMapper = > elContext.getFunctionMapper(){code} > {color:#0e101a} A sample application is also attached. It works with the > reference implementation, but not with MyFaces. {color} > After looking over the code, I noticed that > _{color:#0e101a}FacesELContext{color}_ {color:#0e101a}is not initialized with > a default function mapper, and the > {color}_{color:#0e101a}FacesELContext{color}_{color:#0e101a}#setFunctionMapper > was never called. I addressed this by setFunctionMapper in the > {color}_{color:#0e101a}NamespaceHandler{color}_{color:#0e101a}. Please let me > know if you have any improvements to this fix. The behavior with my fix > matches how the reference implementation behaves. {color} > > {color:#0e101a}Additionally, this fix worked for version 2.2, but version 2.3 > needed another change with the partialStateSavingDefault variable. I believe > It's to false by accident when it's checked here: {color} > > {code:java} > partialStateSavingDefault = "2.0".equals(facesVersion) || > "2.1".equals(facesVersion) || "2.2".equals(facesVersion) || (facesVersion == > null); > {code} > > {color:#0e101a}I wasn't sure whether to add > {color}_{color:#0e101a}"2.3".equals(facesVersion){color}_{color:#0e101a}, but > I thought it would be better to create a default state variable and keep it > within the StateManager. Please advice if this change should also be applied > to 3.0 & master? > > Thank you{color} > -- This message was sent by Atlassian Jira (v8.3.4#803005)