Description
In EL3.0 your may construct literal sets and maps using curly braces,
e.g. "#{
}" for a set or "#{
{ 'a':1, 'b':2 } }" for a map.
Unfortunately myfaces cuts the EL expression on the first occurence
of character '}', which is wrong in this case. It happens in ELText.java,
caused by method "findVarLength". Here is patch that fixes this:
— impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java 2016-04-06 14:55:02.000000000 +0200
+++ impl/src/main/java/org/apache/myfaces/view/facelets/el/ELText.java 2016-09-15 12:48:50.163853337 +0200
@@ -699,6 +699,7 @@
int len = ca.length;
char c = 0;
int str = 0;
+ int nest = 0;
while (i < len)
}
- else if (str == 0 && ('}' == c))
+ else if ('Unknown macro: {' == c && str == 0)+ { + ++nest; + }+ else if ('}' == c && str == 0 && nest > 1)
{ + --nest; + }
++ else if (str == 0 && ('}' == c && nest == 1))
{ return i - s + 1; }