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/06/17 15:37:15 UTC
svn commit: r1136878 -
/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
Author: lu4242
Date: Fri Jun 17 13:37:15 2011
New Revision: 1136878
URL: http://svn.apache.org/viewvc?rev=1136878&view=rev
Log:
MYFACES-3160 [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions) (fix initial template manager)
Modified:
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java?rev=1136878&r1=1136877&r2=1136878&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java Fri Jun 17 13:37:15 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()