You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2023/01/17 16:26:48 UTC
[myfaces] branch main updated: removed perf optimization, already in tomcat since 2020
This is an automated email from the ASF dual-hosted git repository.
tandraschko 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 99847ca88 removed perf optimization, already in tomcat since 2020
99847ca88 is described below
commit 99847ca88eca780e1b815b181763fa486eb0e8bf
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Tue Jan 17 17:26:39 2023 +0100
removed perf optimization, already in tomcat since 2020
---
.../java/org/apache/myfaces/el/FacesELContext.java | 69 ----------------------
1 file changed, 69 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/el/FacesELContext.java b/impl/src/main/java/org/apache/myfaces/el/FacesELContext.java
index 6d2a3c4bc..f70c6cca0 100644
--- a/impl/src/main/java/org/apache/myfaces/el/FacesELContext.java
+++ b/impl/src/main/java/org/apache/myfaces/el/FacesELContext.java
@@ -18,12 +18,8 @@
*/
package org.apache.myfaces.el;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
import jakarta.el.ELContext;
import jakarta.el.ELResolver;
-import jakarta.el.EvaluationListener;
import jakarta.el.FunctionMapper;
import jakarta.el.VariableMapper;
import jakarta.faces.context.FacesContext;
@@ -39,9 +35,6 @@ public class FacesELContext extends ELContext
private FunctionMapper _functionMapper;
private VariableMapper _variableMapper;
- // overwrite to optimize access and reduce created objects
- private List<EvaluationListener> listeners;
-
public FacesELContext(ELResolver elResolver, FacesContext facesContext)
{
this._elResolver = elResolver;
@@ -75,66 +68,4 @@ public class FacesELContext extends ELContext
{
return _elResolver;
}
-
- @Override
- public void addEvaluationListener(EvaluationListener listener)
- {
- if (listeners == null)
- {
- listeners = new ArrayList<>();
- }
-
- listeners.add(listener);
- }
-
- @Override
- public List<EvaluationListener> getEvaluationListeners()
- {
- return listeners == null ? Collections.emptyList() : listeners;
- }
-
- @Override
- public void notifyBeforeEvaluation(String expression)
- {
- if (listeners == null)
- {
- return;
- }
-
- for (int i = 0; i < listeners.size(); i++)
- {
- EvaluationListener listener = listeners.get(i);
- listener.beforeEvaluation(this, expression);
- }
- }
-
- @Override
- public void notifyAfterEvaluation(String expression)
- {
- if (listeners == null)
- {
- return;
- }
-
- for (int i = 0; i < listeners.size(); i++)
- {
- EvaluationListener listener = listeners.get(i);
- listener.afterEvaluation(this, expression);
- }
- }
-
- @Override
- public void notifyPropertyResolved(Object base, Object property)
- {
- if (listeners == null)
- {
- return;
- }
-
- for (int i = 0; i < listeners.size(); i++)
- {
- EvaluationListener listener = listeners.get(i);
- listener.propertyResolved(this, base, property);
- }
- }
}