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 2016/10/26 01:55:14 UTC

svn commit: r1766615 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java

Author: lu4242
Date: Wed Oct 26 01:55:13 2016
New Revision: 1766615

URL: http://svn.apache.org/viewvc?rev=1766615&view=rev
Log:
MYFACES-4064 EL 3.0 Collection construction broken (Thanks to Andreas Osterburg for provide this patch)

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

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java?rev=1766615&r1=1766614&r2=1766615&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java Wed Oct 26 01:55:13 2016
@@ -699,6 +699,7 @@ public class ELText
         int len = ca.length;
         char c = 0;
         int str = 0;
+        int nest = 0;
         while (i < len)
         {
             c = ca[i];
@@ -717,7 +718,15 @@ public class ELText
                     str = c;
                 }
             }
-            else if (str == 0 && ('}' == c))
+            else if ('{' == c && str == 0)
+            {
+                ++nest;
+            }
+            else if ('}' == c && str == 0 && nest > 1)
+            {
+                --nest;
+            }
+            else if (str == 0 && ('}' == c && nest == 1))
             {
                 return i - s + 1;
             }