myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1136879 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
Date Fri, 17 Jun 2011 13:37:29 GMT
Author: lu4242
Date: Fri Jun 17 13:37:29 2011
New Revision: 1136879

URL: http://svn.apache.org/viewvc?rev=1136879&view=rev
Log:
MYFACES-3160 [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions) (fix
initial template manager)

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java?rev=1136879&r1=1136878&r2=1136879&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
Fri Jun 17 13:37:29 2011
@@ -158,6 +158,10 @@ public class TemplateContextImpl extends
                 ELException
         {
             String testName = (name != null) ? name : "facelets._NULL_DEF_";
+            if (this._owner == null)
+            {
+                return false;
+            }
             if (this._names.contains(testName))
             {
                 return false;
@@ -202,7 +206,14 @@ public class TemplateContextImpl extends
         {
             // System.out.println(this.owner.getAlias() + " == " +
             // ((DefaultFacelet) o).getAlias());
-            return this._owner == o || this._target == o;
+            if (this._owner != null)
+            {
+                return this._owner == o || this._target == o;
+            }
+            else
+            {
+                return this._target == o;
+            }
         }
 
         public boolean isRoot()



Mime
View raw message