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:47 UTC

[myfaces] branch master updated: small perf improvement

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 cbe4bd5  small perf improvement
cbe4bd5 is described below

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

    small perf improvement
---
 .../apache/myfaces/context/servlet/FacesContextImplBase.java   | 10 ++++------
 1 file changed, 4 insertions(+), 6 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 b19cccf..ffc781c 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
@@ -307,20 +307,18 @@ 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;
         }
-        
+
         if (_cachedRenderKitId == null || !renderKitId.equals(_cachedRenderKitId))
         {
             _cachedRenderKitId = renderKitId;