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 2009/02/11 19:46:03 UTC

svn commit: r743447 - /myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java

Author: lu4242
Date: Wed Feb 11 18:46:03 2009
New Revision: 743447

URL: http://svn.apache.org/viewvc?rev=743447&view=rev
Log:
fix bug popComponentFromEL when the next current component is none

Modified:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java?rev=743447&r1=743446&r2=743447&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/component/UIComponent.java Wed Feb 11 18:46:03 2009
@@ -512,7 +512,11 @@
         // UIComponent, if any, becomes the current component.
         Deque<UIComponent> componentStack = (Deque<UIComponent>) contextAttributes.get(UIComponent._COMPONENT_STACK);
         
-        UIComponent newCurrent = componentStack.pop();
+        UIComponent newCurrent = null;
+        if (componentStack != null && !componentStack.isEmpty())
+        {
+            newCurrent = componentStack.pop();
+        }
         UIComponent oldCurrent = (UIComponent)contextAttributes.put(UIComponent.CURRENT_COMPONENT, newCurrent);
         
         if (oldCurrent != null && oldCurrent._isCompositeComponent())