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 2020/11/17 16:03:59 UTC

[myfaces] branch 2.3-next updated: small perf improvement

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

tandraschko pushed a commit to branch 2.3-next
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.3-next by this push:
     new e294f17  small perf improvement
e294f17 is described below

commit e294f17231a72c64633073477a6f747082c8fcc9
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Tue Nov 17 17:03:49 2020 +0100

    small perf improvement
---
 .../org/apache/myfaces/context/servlet/FacesContextImplBase.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImplBase.java b/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImplBase.java
index 2da4b22..7a7888c 100644
--- a/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImplBase.java
+++ b/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImplBase.java
@@ -303,15 +303,13 @@ public abstract class FacesContextImplBase extends FacesContext
     @Override
     public final RenderKit getRenderKit()
     {
-        assertNotReleased();
-
-        if (getViewRoot() == null)
+        UIViewRoot viewRoot = getViewRoot();
+        if (viewRoot == null)
         {
             return null;
         }
 
-        String renderKitId = getViewRoot().getRenderKitId();
-
+        String renderKitId = viewRoot.getRenderKitId();
         if (renderKitId == null)
         {
             return null;