Permalink
Browse files

MYFACES-4064 EL 3.0 Collection construction broken (Thanks to Andreas…

… Osterburg for provide this patch)

git-svn-id: https://svn.apache.org/repos/asf/myfaces/core/trunk@1766615 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 2935b64 commit 5d9528a2df6054b0c01e6c60dc369389dc3ed328 lu4242 committed Oct 26, 2016
Showing with 10 additions and 1 deletion.
  1. +10 −1 impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java
@@ -699,6 +699,7 @@ private static int findVarLength(char[] ca, int s) throws ELException
int len = ca.length;
char c = 0;
int str = 0;
+ int nest = 0;
while (i < len)
{
c = ca[i];
@@ -717,7 +718,15 @@ else if ('\'' == c || '"' == c)
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;
}

0 comments on commit 5d9528a

Please sign in to comment.