You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/07/28 03:53:51 UTC

svn commit: r1151697 - /myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java

Author: lu4242
Date: Thu Jul 28 01:53:50 2011
New Revision: 1151697

URL: http://svn.apache.org/viewvc?rev=1151697&view=rev
Log:
MYFACES-3136 [perf] review UIComponentBase.getRendererType 

Modified:
    myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java

Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=1151697&r1=1151696&r2=1151697&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIComponentBase.java Thu Jul 28 01:53:50 2011
@@ -916,7 +916,11 @@ public abstract class UIComponentBase ex
     public String getRendererType()
     {
         // rendererType is literal-only, no ValueExpression - MYFACES-3136:
-        return (String) getStateHelper().get(PropertyKeys.rendererType);
+        // Even if this is true, according to JSF spec section 8 Rendering Model,
+        // this part is essential to implement "delegated implementation" pattern,
+        // so we can't do this optimization here. Instead, JSF developers could prevent
+        // this evaluation overriding this method directly.
+        return (String) getStateHelper().eval(PropertyKeys.rendererType);
     }
 
     /**