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 2019/05/02 12:38:49 UTC
[myfaces] branch master updated: [perf] avoid class lookup
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/master by this push:
new 5cd55a9 [perf] avoid class lookup
5cd55a9 is described below
commit 5cd55a9a7bbe2d6eeb0ec89d7dc6e1ef87d7bc41
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu May 2 14:38:41 2019 +0200
[perf] avoid class lookup
---
.../org/apache/myfaces/application/FacesServletMappingUtils.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/impl/src/main/java/org/apache/myfaces/application/FacesServletMappingUtils.java b/impl/src/main/java/org/apache/myfaces/application/FacesServletMappingUtils.java
index ade978e..77b93e7 100644
--- a/impl/src/main/java/org/apache/myfaces/application/FacesServletMappingUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/application/FacesServletMappingUtils.java
@@ -113,6 +113,12 @@ public class FacesServletMappingUtils
public static boolean isFacesServlet(FacesContext facesContext, String servletClassName)
{
+ // shortcut to avoid class lookup
+ if (FacesServlet.class.getName().equals(servletClassName))
+ {
+ return true;
+ }
+
Class servletClass = ClassUtils.simpleClassForName(servletClassName, false);
if (servletClass != null)
{