You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pa...@apache.org on 2022/11/28 13:39:57 UTC

[myfaces] branch main updated: MYFACES-4503: use ELManager.getExpressionFactory()

This is an automated email from the ASF dual-hosted git repository.

paulnicolucci pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/main by this push:
     new fe997c159 MYFACES-4503: use ELManager.getExpressionFactory()
     new d49587fb8 Merge pull request #399 from pnicolucci/MYFACES-4503
fe997c159 is described below

commit fe997c15989bcf64e0005bd9ea5a019536d12eaa
Author: Paul Nicolucci <pn...@gmail.com>
AuthorDate: Thu Nov 17 20:01:51 2022 -0500

    MYFACES-4503: use ELManager.getExpressionFactory()
---
 .../apache/myfaces/webapp/FacesInitializerImpl.java   | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerImpl.java b/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerImpl.java
index a00b141d5..c00d8099c 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/FacesInitializerImpl.java
@@ -33,6 +33,7 @@ import org.apache.myfaces.spi.InjectionProviderFactory;
 import org.apache.myfaces.util.ExternalSpecifications;
 import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
 
+import jakarta.el.ELManager;
 import jakarta.el.ExpressionFactory;
 import jakarta.faces.application.Application;
 import jakarta.faces.application.ProjectStage;
@@ -723,24 +724,10 @@ public class FacesInitializerImpl implements FacesInitializer
     protected void initContainerIntegration(ServletContext servletContext, ExternalContext externalContext)
     {
         ExpressionFactory expressionFactory = getUserDefinedExpressionFactory(externalContext);
+
         if (expressionFactory == null)
         {
-            String[] candidates = new String[] { "org.apache.el.ExpressionFactoryImpl",
-                "com.sun.el.ExpressionFactoryImpl", "de.odysseus.el.ExpressionFactoryImpl",
-                "org.jboss.el.ExpressionFactoryImpl", "com.caucho.el.ExpressionFactoryImpl" };
-            
-            for (String candidate : candidates)
-            {
-                expressionFactory = loadExpressionFactory(candidate, false);
-                if (expressionFactory != null)
-                {
-                    if (log.isLoggable(Level.FINE))
-                    {
-                        log.fine(ExpressionFactory.class.getName() + " implementation found: " + candidate);
-                    }
-                    break;
-                }
-            }
+            expressionFactory = ELManager.getExpressionFactory();
         }
 
         if (expressionFactory == null)