JBossWeb SVN: r1807 - branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf.
by jbossweb-commits@lists.jboss.org
Author: dehort
Date: 2011-08-11 15:30:51 -0400 (Thu, 11 Aug 2011)
New Revision: 1807
Modified:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/B2CConverter.java
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/C2BConverter.java
Log:
Backporting fix for unsafe use of position().
Originally fixed here: branches/2.1.x@1413
[JBPAPP-6921]
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/B2CConverter.java 2011-08-10 09:49:32 UTC (rev 1806)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/B2CConverter.java 2011-08-11 19:30:51 UTC (rev 1807)
@@ -81,8 +81,8 @@
bb = ByteBuffer.wrap(bc.getBuffer(), bc.getStart(), bc.getLength());
} else {
// Initialize the byte buffer
+ bb.limit(bc.getEnd());
bb.position(bc.getStart());
- bb.limit(bc.getEnd());
}
if ((cb == null) || (cb.array() != cc.getBuffer())) {
// Create a new char buffer if anything changed
@@ -90,8 +90,8 @@
cc.getBuffer().length - cc.getEnd());
} else {
// Initialize the char buffer
+ cb.limit(cc.getBuffer().length);
cb.position(cc.getEnd());
- cb.limit(cc.getBuffer().length);
}
CoderResult result = null;
// Parse leftover if any are present
@@ -126,8 +126,8 @@
cc.setEnd(cb.position());
// Put leftovers in the leftovers byte buffer
if (bc.getLength() > 0) {
+ leftovers.limit(leftovers.array().length);
leftovers.position(bc.getLength());
- leftovers.limit(leftovers.array().length);
bc.substract(leftovers.array(), 0, bc.getLength());
}
}
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/C2BConverter.java 2011-08-10 09:49:32 UTC (rev 1806)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/java/org/apache/tomcat/util/buf/C2BConverter.java 2011-08-11 19:30:51 UTC (rev 1807)
@@ -75,8 +75,8 @@
bc.getBuffer().length - bc.getEnd());
} else {
// Initialize the byte buffer
+ bb.limit(bc.getBuffer().length);
bb.position(bc.getEnd());
- bb.limit(bc.getBuffer().length);
}
if ((cb == null) || (cb.array() != cc.getBuffer())) {
// Create a new char buffer if anything changed
@@ -84,8 +84,8 @@
cc.getLength());
} else {
// Initialize the char buffer
+ cb.limit(cc.getEnd());
cb.position(cc.getStart());
- cb.limit(cc.getEnd());
}
// Do the decoding and get the results into the byte chunk and the char chunk
CoderResult result = encoder.encode(cb, bb, false);
13 years, 4 months
JBossWeb SVN: r1806 - in branches/2.1.x: java/org/apache/el/lang and 4 other directories.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2011-08-10 05:49:32 -0400 (Wed, 10 Aug 2011)
New Revision: 1806
Added:
branches/2.1.x/java/org/apache/jasper/compiler/AttributeParser.java
Modified:
branches/2.1.x/java/org/apache/el/MethodExpressionImpl.java
branches/2.1.x/java/org/apache/el/lang/ELSupport.java
branches/2.1.x/java/org/apache/el/parser/AstLiteralExpression.java
branches/2.1.x/java/org/apache/el/parser/AstString.java
branches/2.1.x/java/org/apache/el/parser/AstValue.java
branches/2.1.x/java/org/apache/el/parser/ELParser.java
branches/2.1.x/java/org/apache/el/parser/ELParser.jjt
branches/2.1.x/java/org/apache/el/parser/ELParserConstants.java
branches/2.1.x/java/org/apache/el/parser/ELParserTokenManager.java
branches/2.1.x/java/org/apache/el/parser/ELParserTreeConstants.java
branches/2.1.x/java/org/apache/el/parser/JJTELParserState.java
branches/2.1.x/java/org/apache/el/parser/Node.java
branches/2.1.x/java/org/apache/el/parser/ParseException.java
branches/2.1.x/java/org/apache/el/parser/SimpleCharStream.java
branches/2.1.x/java/org/apache/el/parser/SimpleNode.java
branches/2.1.x/java/org/apache/el/parser/Token.java
branches/2.1.x/java/org/apache/el/parser/TokenMgrError.java
branches/2.1.x/java/org/apache/jasper/compiler/ELParser.java
branches/2.1.x/java/org/apache/jasper/compiler/Generator.java
branches/2.1.x/java/org/apache/jasper/compiler/Parser.java
branches/2.1.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
branches/2.1.x/webapps/docs/changelog.xml
Log:
Port of "r1355" for JBPAPP-6382.
Modified: branches/2.1.x/java/org/apache/el/MethodExpressionImpl.java
===================================================================
--- branches/2.1.x/java/org/apache/el/MethodExpressionImpl.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/MethodExpressionImpl.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -311,4 +311,9 @@
public boolean isLiteralText() {
return false;
}
+
+ public boolean isParametersProvided() {
+ return this.getNode().isParametersProvided();
+ }
+
}
Modified: branches/2.1.x/java/org/apache/el/lang/ELSupport.java
===================================================================
--- branches/2.1.x/java/org/apache/el/lang/ELSupport.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/lang/ELSupport.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -249,6 +249,9 @@
if (Number.class.equals(type)) {
return number;
}
+ if (Number.class.equals(type)) {
+ return number;
+ }
throw new IllegalArgumentException(MessageFactory.get("error.convert",
number, number.getClass(), type));
Modified: branches/2.1.x/java/org/apache/el/parser/AstLiteralExpression.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/AstLiteralExpression.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/AstLiteralExpression.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -49,10 +49,10 @@
StringBuffer buf = new StringBuffer(size);
for (int i = 0; i < size; i++) {
char c = image.charAt(i);
- if (c == '\\' && i + 1 < size) {
+ if (c == '\\' && i + 2 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#'
- || c1 == '$') {
+ char c2 = image.charAt(i + 2);
+ if ((c1 == '#' || c1 == '$') && c2 == '{') {
c = c1;
i++;
}
Modified: branches/2.1.x/java/org/apache/el/parser/AstString.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/AstString.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/AstString.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -62,8 +62,7 @@
char c = image.charAt(i);
if (c == '\\' && i + 1 < size) {
char c1 = image.charAt(i + 1);
- if (c1 == '\\' || c1 == '"' || c1 == '\'' || c1 == '#'
- || c1 == '$') {
+ if (c1 == '\\' || c1 == '"' || c1 == '\'') {
c = c1;
i++;
}
Modified: branches/2.1.x/java/org/apache/el/parser/AstValue.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/AstValue.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/AstValue.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -175,4 +175,13 @@
}
return result;
}
+
+ public boolean isParametersProvided() {
+ if (jjtGetNumChildren() > 1 && this.children[1] != null &&
+ this.children[1] instanceof AstDotSuffix) {
+ return (this.children[1].jjtGetNumChildren()) > 0;
+ }
+ return false;
+ }
+
}
Modified: branches/2.1.x/java/org/apache/el/parser/ELParser.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ELParser.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ELParser.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1486,9 +1486,9 @@
private boolean jj_3R_29() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(29)) {
+ if (jj_scan_token(27)) {
jj_scanpos = xsp;
- if (jj_scan_token(30)) return true;
+ if (jj_scan_token(28)) return true;
}
return false;
}
@@ -1501,9 +1501,9 @@
private boolean jj_3R_28() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(31)) {
+ if (jj_scan_token(29)) {
jj_scanpos = xsp;
- if (jj_scan_token(32)) return true;
+ if (jj_scan_token(30)) return true;
}
return false;
}
@@ -1511,9 +1511,9 @@
private boolean jj_3R_27() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(25)) {
+ if (jj_scan_token(23)) {
jj_scanpos = xsp;
- if (jj_scan_token(26)) return true;
+ if (jj_scan_token(24)) return true;
}
return false;
}
@@ -1537,9 +1537,9 @@
private boolean jj_3R_26() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(27)) {
+ if (jj_scan_token(25)) {
jj_scanpos = xsp;
- if (jj_scan_token(28)) return true;
+ if (jj_scan_token(26)) return true;
}
return false;
}
@@ -1577,9 +1577,9 @@
private boolean jj_3R_23() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(35)) {
+ if (jj_scan_token(33)) {
jj_scanpos = xsp;
- if (jj_scan_token(36)) return true;
+ if (jj_scan_token(34)) return true;
}
return false;
}
@@ -1592,9 +1592,9 @@
private boolean jj_3R_22() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(33)) {
+ if (jj_scan_token(31)) {
jj_scanpos = xsp;
- if (jj_scan_token(34)) return true;
+ if (jj_scan_token(32)) return true;
}
return false;
}
@@ -1612,9 +1612,9 @@
private boolean jj_3R_17() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(39)) {
+ if (jj_scan_token(37)) {
jj_scanpos = xsp;
- if (jj_scan_token(40)) return true;
+ if (jj_scan_token(38)) return true;
}
return false;
}
@@ -1692,9 +1692,9 @@
private boolean jj_3R_15() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(41)) {
+ if (jj_scan_token(39)) {
jj_scanpos = xsp;
- if (jj_scan_token(42)) return true;
+ if (jj_scan_token(40)) return true;
}
return false;
}
@@ -1809,9 +1809,9 @@
private boolean jj_3R_35() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(37)) {
+ if (jj_scan_token(35)) {
jj_scanpos = xsp;
- if (jj_scan_token(38)) return true;
+ if (jj_scan_token(36)) return true;
}
if (jj_3R_30()) return true;
return false;
@@ -1847,9 +1847,9 @@
private boolean jj_3R_40() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(51)) {
+ if (jj_scan_token(49)) {
jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
+ if (jj_scan_token(50)) return true;
}
return false;
}
@@ -1857,9 +1857,9 @@
private boolean jj_3R_39() {
Token xsp;
xsp = jj_scanpos;
- if (jj_scan_token(49)) {
+ if (jj_scan_token(47)) {
jj_scanpos = xsp;
- if (jj_scan_token(50)) return true;
+ if (jj_scan_token(48)) return true;
}
return false;
}
@@ -1916,10 +1916,10 @@
jj_la1_init_1();
}
private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0xe,0xe,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfe000000,0x18000000,0x6000000,0x80000000,0x60000000,0xfe000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x9d600,0x240000,0x9d600,0x240000,0x80000,0x0,0x1000000,0x9d600,0x1d600,0xc000,};
+ jj_la1_0 = new int[] {0xe,0xe,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x0,0x80000000,0x7f800000,0x6000000,0x1800000,0x60000000,0x18000000,0x7f800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x27b00,0x90000,0x27b00,0x90000,0x20000,0x0,0x400000,0x27b00,0x7b00,0x3000,};
}
private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x0,0x0,0x600,0x600,0x180,0x180,0x1e,0x6,0x18,0x1e,0x1,0x0,0x0,0x1,0x0,0x1,0xc000,0xc000,0x1e2000,0x60000,0x180000,0x1e2000,0x60,0x208860,0x0,0x200000,0x0,0x0,0x200000,0x0,0x208860,0x0,0x0,};
+ jj_la1_1 = new int[] {0x0,0x0,0x180,0x180,0x60,0x60,0x7,0x1,0x6,0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x3000,0x78800,0x18000,0x60000,0x78800,0x18,0x82218,0x0,0x80000,0x0,0x0,0x80000,0x0,0x82218,0x0,0x0,};
}
final private JJCalls[] jj_2_rtns = new JJCalls[3];
private boolean jj_rescan = false;
@@ -2074,7 +2074,7 @@
return (jj_ntk = jj_nt.kind);
}
- private java.util.List jj_expentries = new java.util.ArrayList();
+ private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();
private int[] jj_expentry;
private int jj_kind = -1;
private int[] jj_lasttokens = new int[100];
@@ -2089,7 +2089,7 @@
for (int i = 0; i < jj_endpos; i++) {
jj_expentry[i] = jj_lasttokens[i];
}
- jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) {
+ jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {
int[] oldentry = (int[])(it.next());
if (oldentry.length == jj_expentry.length) {
for (int i = 0; i < jj_expentry.length; i++) {
@@ -2108,7 +2108,7 @@
/** Generate ParseException. */
public ParseException generateParseException() {
jj_expentries.clear();
- boolean[] la1tokens = new boolean[59];
+ boolean[] la1tokens = new boolean[57];
if (jj_kind >= 0) {
la1tokens[jj_kind] = true;
jj_kind = -1;
@@ -2125,7 +2125,7 @@
}
}
}
- for (int i = 0; i < 59; i++) {
+ for (int i = 0; i < 57; i++) {
if (la1tokens[i]) {
jj_expentry = new int[1];
jj_expentry[0] = i;
@@ -2137,7 +2137,7 @@
jj_add_error_token(0, 0);
int[][] exptokseq = new int[jj_expentries.size()][];
for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.get(i);
+ exptokseq[i] = jj_expentries.get(i);
}
return new ParseException(token, exptokseq, tokenImage);
}
Modified: branches/2.1.x/java/org/apache/el/parser/ELParser.jjt
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ELParser.jjt 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ELParser.jjt 2011-08-10 09:49:32 UTC (rev 1806)
@@ -353,11 +353,15 @@
/* ==================================================================================== */
<DEFAULT> TOKEN :
{
+ /*
+ * The following definition uses + rather than * in two places to prevent
+ * LITERAL_EXPRESSION matching the empty string that could result in the
+ * Parser entering an infinite loop.
+ */
< LITERAL_EXPRESSION:
- ((~["\\", "$", "#"])
- | ("\\" ("\\" | "$" | "#"))
- | ("$" ~["{", "$"])
- | ("#" ~["{", "#"])
+ ( (~["$", "#", "\\"])* "\\" (["$", "#"])?
+ | (~["$", "#"])* (["$", "#"] ~["{"])
+ | (~["$", "#"])+
)+
| "$"
| "#"
@@ -368,8 +372,6 @@
< START_DEFERRED_EXPRESSION: "#{" > : IN_EXPRESSION
}
-<DEFAULT> SKIP : { "\\" }
-
<IN_EXPRESSION> SKIP : { " " | "\t" | "\n" | "\r" }
<IN_EXPRESSION> TOKEN :
@@ -381,13 +383,10 @@
>
| < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
| < STRING_LITERAL: ("\"" ((~["\"","\\"])
- | ("\\" ( ["\\","\""] )))* "\"")
+ | ("\\" ( ["\\","\"","\'"] )))* "\"")
| ("\'" ((~["\'","\\"])
- | ("\\" ( ["\\","\'"] )))* "\'")
+ | ("\\" ( ["\\","\"","\'"] )))* "\'")
>
-| < BADLY_ESCAPED_STRING_LITERAL: ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] )))
- | ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
| < TRUE : "true" >
| < FALSE : "false" >
| < NULL : "null" >
Modified: branches/2.1.x/java/org/apache/el/parser/ELParserConstants.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ELParserConstants.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ELParserConstants.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -17,105 +17,103 @@
/** RegularExpression Id. */
int START_DEFERRED_EXPRESSION = 3;
/** RegularExpression Id. */
- int INTEGER_LITERAL = 9;
+ int INTEGER_LITERAL = 8;
/** RegularExpression Id. */
- int FLOATING_POINT_LITERAL = 10;
+ int FLOATING_POINT_LITERAL = 9;
/** RegularExpression Id. */
- int EXPONENT = 11;
+ int EXPONENT = 10;
/** RegularExpression Id. */
- int STRING_LITERAL = 12;
+ int STRING_LITERAL = 11;
/** RegularExpression Id. */
- int BADLY_ESCAPED_STRING_LITERAL = 13;
+ int TRUE = 12;
/** RegularExpression Id. */
- int TRUE = 14;
+ int FALSE = 13;
/** RegularExpression Id. */
- int FALSE = 15;
+ int NULL = 14;
/** RegularExpression Id. */
- int NULL = 16;
+ int END_EXPRESSION = 15;
/** RegularExpression Id. */
- int END_EXPRESSION = 17;
+ int DOT = 16;
/** RegularExpression Id. */
- int DOT = 18;
+ int LPAREN = 17;
/** RegularExpression Id. */
- int LPAREN = 19;
+ int RPAREN = 18;
/** RegularExpression Id. */
- int RPAREN = 20;
+ int LBRACK = 19;
/** RegularExpression Id. */
- int LBRACK = 21;
+ int RBRACK = 20;
/** RegularExpression Id. */
- int RBRACK = 22;
+ int COLON = 21;
/** RegularExpression Id. */
- int COLON = 23;
+ int COMMA = 22;
/** RegularExpression Id. */
- int COMMA = 24;
+ int GT0 = 23;
/** RegularExpression Id. */
- int GT0 = 25;
+ int GT1 = 24;
/** RegularExpression Id. */
- int GT1 = 26;
+ int LT0 = 25;
/** RegularExpression Id. */
- int LT0 = 27;
+ int LT1 = 26;
/** RegularExpression Id. */
- int LT1 = 28;
+ int GE0 = 27;
/** RegularExpression Id. */
- int GE0 = 29;
+ int GE1 = 28;
/** RegularExpression Id. */
- int GE1 = 30;
+ int LE0 = 29;
/** RegularExpression Id. */
- int LE0 = 31;
+ int LE1 = 30;
/** RegularExpression Id. */
- int LE1 = 32;
+ int EQ0 = 31;
/** RegularExpression Id. */
- int EQ0 = 33;
+ int EQ1 = 32;
/** RegularExpression Id. */
- int EQ1 = 34;
+ int NE0 = 33;
/** RegularExpression Id. */
- int NE0 = 35;
+ int NE1 = 34;
/** RegularExpression Id. */
- int NE1 = 36;
+ int NOT0 = 35;
/** RegularExpression Id. */
- int NOT0 = 37;
+ int NOT1 = 36;
/** RegularExpression Id. */
- int NOT1 = 38;
+ int AND0 = 37;
/** RegularExpression Id. */
- int AND0 = 39;
+ int AND1 = 38;
/** RegularExpression Id. */
- int AND1 = 40;
+ int OR0 = 39;
/** RegularExpression Id. */
- int OR0 = 41;
+ int OR1 = 40;
/** RegularExpression Id. */
- int OR1 = 42;
+ int EMPTY = 41;
/** RegularExpression Id. */
- int EMPTY = 43;
+ int INSTANCEOF = 42;
/** RegularExpression Id. */
- int INSTANCEOF = 44;
+ int MULT = 43;
/** RegularExpression Id. */
- int MULT = 45;
+ int PLUS = 44;
/** RegularExpression Id. */
- int PLUS = 46;
+ int MINUS = 45;
/** RegularExpression Id. */
- int MINUS = 47;
+ int QUESTIONMARK = 46;
/** RegularExpression Id. */
- int QUESTIONMARK = 48;
+ int DIV0 = 47;
/** RegularExpression Id. */
- int DIV0 = 49;
+ int DIV1 = 48;
/** RegularExpression Id. */
- int DIV1 = 50;
+ int MOD0 = 49;
/** RegularExpression Id. */
- int MOD0 = 51;
+ int MOD1 = 50;
/** RegularExpression Id. */
- int MOD1 = 52;
+ int IDENTIFIER = 51;
/** RegularExpression Id. */
- int IDENTIFIER = 53;
+ int FUNCTIONSUFFIX = 52;
/** RegularExpression Id. */
- int FUNCTIONSUFFIX = 54;
+ int IMPL_OBJ_START = 53;
/** RegularExpression Id. */
- int IMPL_OBJ_START = 55;
+ int LETTER = 54;
/** RegularExpression Id. */
- int LETTER = 56;
+ int DIGIT = 55;
/** RegularExpression Id. */
- int DIGIT = 57;
- /** RegularExpression Id. */
- int ILLEGAL_CHARACTER = 58;
+ int ILLEGAL_CHARACTER = 56;
/** Lexical state. */
int DEFAULT = 0;
@@ -128,7 +126,6 @@
"<LITERAL_EXPRESSION>",
"\"${\"",
"\"#{\"",
- "\"\\\\\"",
"\" \"",
"\"\\t\"",
"\"\\n\"",
@@ -137,7 +134,6 @@
"<FLOATING_POINT_LITERAL>",
"<EXPONENT>",
"<STRING_LITERAL>",
- "<BADLY_ESCAPED_STRING_LITERAL>",
"\"true\"",
"\"false\"",
"\"null\"",
Modified: branches/2.1.x/java/org/apache/el/parser/ELParserTokenManager.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ELParserTokenManager.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ELParserTokenManager.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -16,18 +16,11 @@
switch (pos)
{
case 0:
- if ((active0 & 0x10L) != 0L)
- return 2;
- if ((active0 & 0x4L) != 0L)
+ if ((active0 & 0xcL) != 0L)
{
jjmatchedKind = 1;
- return 4;
+ return 5;
}
- if ((active0 & 0x8L) != 0L)
- {
- jjmatchedKind = 1;
- return 6;
- }
return -1;
default :
return -1;
@@ -51,8 +44,6 @@
return jjMoveStringLiteralDfa1_0(0x8L);
case 36:
return jjMoveStringLiteralDfa1_0(0x4L);
- case 92:
- return jjStartNfaWithStates_0(0, 4, 2);
default :
return jjMoveNfa_0(7, 0);
}
@@ -77,14 +68,6 @@
}
return jjStartNfa_0(0, active0);
}
-private int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
static final long[] jjbitVec0 = {
0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
};
@@ -114,53 +97,47 @@
{
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
}
else if ((0x1800000000L & l) != 0L)
{
if (kind > 1)
kind = 1;
+ jjCheckNAdd(5);
}
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- else if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
break;
case 0:
- if ((0xffffffe7ffffffffL & l) == 0L)
- break;
- if (kind > 1)
- kind = 1;
- jjCheckNAddStates(0, 3);
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
break;
case 2:
- if ((0x1800000000L & l) == 0L)
+ if ((0xffffffe7ffffffffL & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
case 3:
- if (curChar == 36)
- jjstateSet[jjnewStateCnt++] = 4;
+ if ((0xffffffe7ffffffffL & l) != 0L)
+ jjCheckNAddTwoStates(3, 4);
break;
case 4:
- if ((0xffffffefffffffffL & l) == 0L)
- break;
+ if ((0x1800000000L & l) != 0L)
+ jjCheckNAdd(5);
+ break;
+ case 5:
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(5, 8);
break;
- case 5:
- if (curChar == 35)
- jjstateSet[jjnewStateCnt++] = 6;
- break;
case 6:
- if ((0xfffffff7ffffffffL & l) == 0L)
+ if ((0x1800000000L & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(9, 13);
break;
default : break;
}
@@ -174,40 +151,43 @@
switch(jjstateSet[--i])
{
case 7:
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 4);
if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
+ else if (curChar == 92)
{
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(14, 17);
}
- else if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
break;
case 0:
- if ((0xffffffffefffffffL & l) == 0L)
+ if ((0xffffffffefffffffL & l) != 0L)
+ jjCheckNAddTwoStates(0, 1);
+ break;
+ case 1:
+ if (curChar != 92)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(14, 17);
break;
- case 1:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 2;
- break;
case 2:
- if (curChar != 92)
- break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
- case 4:
- case 6:
+ case 3:
+ jjCheckNAddTwoStates(3, 4);
+ break;
+ case 5:
if ((0xf7ffffffffffffffL & l) == 0L)
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(5, 8);
break;
default : break;
}
@@ -225,15 +205,37 @@
switch(jjstateSet[--i])
{
case 7:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(0, 1);
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ {
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(0, 4);
+ }
+ break;
case 0:
- case 4:
- case 6:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(0, 1);
+ break;
+ case 2:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 1)
kind = 1;
- jjCheckNAddStates(0, 3);
+ jjCheckNAddStates(0, 4);
break;
+ case 3:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ jjCheckNAddTwoStates(3, 4);
+ break;
+ case 5:
+ if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
+ break;
+ if (kind > 1)
+ kind = 1;
+ jjCheckNAddStates(5, 8);
+ break;
default : break;
}
} while(i != startsAt);
@@ -256,84 +258,84 @@
switch (pos)
{
case 0:
- if ((active0 & 0x40000L) != 0L)
+ if ((active0 & 0x10000L) != 0L)
return 1;
- if ((active0 & 0x141d555401c000L) != 0L)
+ if ((active0 & 0x5075555007000L) != 0L)
{
- jjmatchedKind = 53;
- return 36;
+ jjmatchedKind = 51;
+ return 30;
}
return -1;
case 1:
- if ((active0 & 0x41554000000L) != 0L)
- return 36;
- if ((active0 & 0x1419400001c000L) != 0L)
+ if ((active0 & 0x5065000007000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 1;
- return 36;
+ return 30;
}
+ if ((active0 & 0x10555000000L) != 0L)
+ return 30;
return -1;
case 2:
- if ((active0 & 0x18000001c000L) != 0L)
+ if ((active0 & 0x5005000000000L) != 0L)
+ return 30;
+ if ((active0 & 0x60000007000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 2;
- return 36;
+ return 30;
}
- if ((active0 & 0x14014000000000L) != 0L)
- return 36;
return -1;
case 3:
- if ((active0 & 0x14000L) != 0L)
- return 36;
- if ((active0 & 0x180000008000L) != 0L)
+ if ((active0 & 0x5000L) != 0L)
+ return 30;
+ if ((active0 & 0x60000002000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 3;
- return 36;
+ return 30;
}
return -1;
case 4:
- if ((active0 & 0x80000008000L) != 0L)
- return 36;
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 4;
- return 36;
+ return 30;
}
+ if ((active0 & 0x20000002000L) != 0L)
+ return 30;
return -1;
case 5:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 5;
- return 36;
+ return 30;
}
return -1;
case 6:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 6;
- return 36;
+ return 30;
}
return -1;
case 7:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 7;
- return 36;
+ return 30;
}
return -1;
case 8:
- if ((active0 & 0x100000000000L) != 0L)
+ if ((active0 & 0x40000000000L) != 0L)
{
- jjmatchedKind = 53;
+ jjmatchedKind = 51;
jjmatchedPos = 8;
- return 36;
+ return 30;
}
return -1;
default :
@@ -349,70 +351,70 @@
switch(curChar)
{
case 33:
- jjmatchedKind = 37;
- return jjMoveStringLiteralDfa1_1(0x800000000L);
+ jjmatchedKind = 35;
+ return jjMoveStringLiteralDfa1_1(0x200000000L);
case 37:
- return jjStopAtPos(0, 51);
+ return jjStopAtPos(0, 49);
case 38:
- return jjMoveStringLiteralDfa1_1(0x8000000000L);
+ return jjMoveStringLiteralDfa1_1(0x2000000000L);
case 40:
- return jjStopAtPos(0, 19);
+ return jjStopAtPos(0, 17);
case 41:
- return jjStopAtPos(0, 20);
+ return jjStopAtPos(0, 18);
case 42:
- return jjStopAtPos(0, 45);
+ return jjStopAtPos(0, 43);
case 43:
- return jjStopAtPos(0, 46);
+ return jjStopAtPos(0, 44);
case 44:
- return jjStopAtPos(0, 24);
+ return jjStopAtPos(0, 22);
case 45:
- return jjStopAtPos(0, 47);
+ return jjStopAtPos(0, 45);
case 46:
- return jjStartNfaWithStates_1(0, 18, 1);
+ return jjStartNfaWithStates_1(0, 16, 1);
case 47:
- return jjStopAtPos(0, 49);
+ return jjStopAtPos(0, 47);
case 58:
- return jjStopAtPos(0, 23);
+ return jjStopAtPos(0, 21);
case 60:
- jjmatchedKind = 27;
- return jjMoveStringLiteralDfa1_1(0x80000000L);
- case 61:
- return jjMoveStringLiteralDfa1_1(0x200000000L);
- case 62:
jjmatchedKind = 25;
return jjMoveStringLiteralDfa1_1(0x20000000L);
+ case 61:
+ return jjMoveStringLiteralDfa1_1(0x80000000L);
+ case 62:
+ jjmatchedKind = 23;
+ return jjMoveStringLiteralDfa1_1(0x8000000L);
case 63:
- return jjStopAtPos(0, 48);
+ return jjStopAtPos(0, 46);
case 91:
- return jjStopAtPos(0, 21);
+ return jjStopAtPos(0, 19);
case 93:
- return jjStopAtPos(0, 22);
+ return jjStopAtPos(0, 20);
case 97:
- return jjMoveStringLiteralDfa1_1(0x10000000000L);
+ return jjMoveStringLiteralDfa1_1(0x4000000000L);
case 100:
- return jjMoveStringLiteralDfa1_1(0x4000000000000L);
+ return jjMoveStringLiteralDfa1_1(0x1000000000000L);
case 101:
- return jjMoveStringLiteralDfa1_1(0x80400000000L);
+ return jjMoveStringLiteralDfa1_1(0x20100000000L);
case 102:
- return jjMoveStringLiteralDfa1_1(0x8000L);
+ return jjMoveStringLiteralDfa1_1(0x2000L);
case 103:
- return jjMoveStringLiteralDfa1_1(0x44000000L);
+ return jjMoveStringLiteralDfa1_1(0x11000000L);
case 105:
- return jjMoveStringLiteralDfa1_1(0x100000000000L);
+ return jjMoveStringLiteralDfa1_1(0x40000000000L);
case 108:
- return jjMoveStringLiteralDfa1_1(0x110000000L);
+ return jjMoveStringLiteralDfa1_1(0x44000000L);
case 109:
- return jjMoveStringLiteralDfa1_1(0x10000000000000L);
+ return jjMoveStringLiteralDfa1_1(0x4000000000000L);
case 110:
- return jjMoveStringLiteralDfa1_1(0x5000010000L);
+ return jjMoveStringLiteralDfa1_1(0x1400004000L);
case 111:
- return jjMoveStringLiteralDfa1_1(0x40000000000L);
+ return jjMoveStringLiteralDfa1_1(0x10000000000L);
case 116:
- return jjMoveStringLiteralDfa1_1(0x4000L);
+ return jjMoveStringLiteralDfa1_1(0x1000L);
case 124:
- return jjMoveStringLiteralDfa1_1(0x20000000000L);
+ return jjMoveStringLiteralDfa1_1(0x8000000000L);
case 125:
- return jjStopAtPos(0, 17);
+ return jjStopAtPos(0, 15);
default :
return jjMoveNfa_1(0, 0);
}
@@ -427,56 +429,56 @@
switch(curChar)
{
case 38:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStopAtPos(1, 39);
+ if ((active0 & 0x2000000000L) != 0L)
+ return jjStopAtPos(1, 37);
break;
case 61:
- if ((active0 & 0x20000000L) != 0L)
+ if ((active0 & 0x8000000L) != 0L)
+ return jjStopAtPos(1, 27);
+ else if ((active0 & 0x20000000L) != 0L)
return jjStopAtPos(1, 29);
else if ((active0 & 0x80000000L) != 0L)
return jjStopAtPos(1, 31);
else if ((active0 & 0x200000000L) != 0L)
return jjStopAtPos(1, 33);
- else if ((active0 & 0x800000000L) != 0L)
- return jjStopAtPos(1, 35);
break;
case 97:
- return jjMoveStringLiteralDfa2_1(active0, 0x8000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x2000L);
case 101:
- if ((active0 & 0x40000000L) != 0L)
- return jjStartNfaWithStates_1(1, 30, 36);
- else if ((active0 & 0x100000000L) != 0L)
- return jjStartNfaWithStates_1(1, 32, 36);
- else if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 36, 36);
+ if ((active0 & 0x10000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 28, 30);
+ else if ((active0 & 0x40000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 30, 30);
+ else if ((active0 & 0x400000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 34, 30);
break;
case 105:
- return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000L);
case 109:
- return jjMoveStringLiteralDfa2_1(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x20000000000L);
case 110:
- return jjMoveStringLiteralDfa2_1(active0, 0x110000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x44000000000L);
case 111:
- return jjMoveStringLiteralDfa2_1(active0, 0x10004000000000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x4001000000000L);
case 113:
- if ((active0 & 0x400000000L) != 0L)
- return jjStartNfaWithStates_1(1, 34, 36);
+ if ((active0 & 0x100000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 32, 30);
break;
case 114:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStartNfaWithStates_1(1, 42, 36);
- return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
+ if ((active0 & 0x10000000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 40, 30);
+ return jjMoveStringLiteralDfa2_1(active0, 0x1000L);
case 116:
- if ((active0 & 0x4000000L) != 0L)
- return jjStartNfaWithStates_1(1, 26, 36);
- else if ((active0 & 0x10000000L) != 0L)
- return jjStartNfaWithStates_1(1, 28, 36);
+ if ((active0 & 0x1000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 24, 30);
+ else if ((active0 & 0x4000000L) != 0L)
+ return jjStartNfaWithStates_1(1, 26, 30);
break;
case 117:
- return jjMoveStringLiteralDfa2_1(active0, 0x10000L);
+ return jjMoveStringLiteralDfa2_1(active0, 0x4000L);
case 124:
- if ((active0 & 0x20000000000L) != 0L)
- return jjStopAtPos(1, 41);
+ if ((active0 & 0x8000000000L) != 0L)
+ return jjStopAtPos(1, 39);
break;
default :
break;
@@ -495,26 +497,26 @@
switch(curChar)
{
case 100:
- if ((active0 & 0x10000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 40, 36);
- else if ((active0 & 0x10000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 52, 36);
+ if ((active0 & 0x4000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 38, 30);
+ else if ((active0 & 0x4000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 50, 30);
break;
case 108:
- return jjMoveStringLiteralDfa3_1(active0, 0x18000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x6000L);
case 112:
- return jjMoveStringLiteralDfa3_1(active0, 0x80000000000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x20000000000L);
case 115:
- return jjMoveStringLiteralDfa3_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x40000000000L);
case 116:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 38, 36);
+ if ((active0 & 0x1000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 36, 30);
break;
case 117:
- return jjMoveStringLiteralDfa3_1(active0, 0x4000L);
+ return jjMoveStringLiteralDfa3_1(active0, 0x1000L);
case 118:
- if ((active0 & 0x4000000000000L) != 0L)
- return jjStartNfaWithStates_1(2, 50, 36);
+ if ((active0 & 0x1000000000000L) != 0L)
+ return jjStartNfaWithStates_1(2, 48, 30);
break;
default :
break;
@@ -533,17 +535,17 @@
switch(curChar)
{
case 101:
- if ((active0 & 0x4000L) != 0L)
- return jjStartNfaWithStates_1(3, 14, 36);
+ if ((active0 & 0x1000L) != 0L)
+ return jjStartNfaWithStates_1(3, 12, 30);
break;
case 108:
- if ((active0 & 0x10000L) != 0L)
- return jjStartNfaWithStates_1(3, 16, 36);
+ if ((active0 & 0x4000L) != 0L)
+ return jjStartNfaWithStates_1(3, 14, 30);
break;
case 115:
- return jjMoveStringLiteralDfa4_1(active0, 0x8000L);
+ return jjMoveStringLiteralDfa4_1(active0, 0x2000L);
case 116:
- return jjMoveStringLiteralDfa4_1(active0, 0x180000000000L);
+ return jjMoveStringLiteralDfa4_1(active0, 0x60000000000L);
default :
break;
}
@@ -561,14 +563,14 @@
switch(curChar)
{
case 97:
- return jjMoveStringLiteralDfa5_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa5_1(active0, 0x40000000000L);
case 101:
- if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_1(4, 15, 36);
+ if ((active0 & 0x2000L) != 0L)
+ return jjStartNfaWithStates_1(4, 13, 30);
break;
case 121:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStartNfaWithStates_1(4, 43, 36);
+ if ((active0 & 0x20000000000L) != 0L)
+ return jjStartNfaWithStates_1(4, 41, 30);
break;
default :
break;
@@ -587,7 +589,7 @@
switch(curChar)
{
case 110:
- return jjMoveStringLiteralDfa6_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa6_1(active0, 0x40000000000L);
default :
break;
}
@@ -605,7 +607,7 @@
switch(curChar)
{
case 99:
- return jjMoveStringLiteralDfa7_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa7_1(active0, 0x40000000000L);
default :
break;
}
@@ -623,7 +625,7 @@
switch(curChar)
{
case 101:
- return jjMoveStringLiteralDfa8_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa8_1(active0, 0x40000000000L);
default :
break;
}
@@ -641,7 +643,7 @@
switch(curChar)
{
case 111:
- return jjMoveStringLiteralDfa9_1(active0, 0x100000000000L);
+ return jjMoveStringLiteralDfa9_1(active0, 0x40000000000L);
default :
break;
}
@@ -659,8 +661,8 @@
switch(curChar)
{
case 102:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStartNfaWithStates_1(9, 44, 36);
+ if ((active0 & 0x40000000000L) != 0L)
+ return jjStartNfaWithStates_1(9, 42, 30);
break;
default :
break;
@@ -696,7 +698,7 @@
private int jjMoveNfa_1(int startState, int curPos)
{
int startsAt = 0;
- jjnewStateCnt = 36;
+ jjnewStateCnt = 30;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
@@ -714,42 +716,42 @@
case 0:
if ((0x3ff000000000000L & l) != 0L)
{
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(4, 8);
+ if (kind > 8)
+ kind = 8;
+ jjCheckNAddStates(18, 22);
}
else if ((0x1800000000L & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
}
else if (curChar == 39)
- jjCheckNAddStates(9, 13);
+ jjCheckNAddStates(23, 25);
else if (curChar == 34)
- jjCheckNAddStates(14, 18);
+ jjCheckNAddStates(26, 28);
else if (curChar == 46)
jjCheckNAdd(1);
break;
- case 36:
+ case 30:
if ((0x3ff001000000000L & l) != 0L)
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
if ((0x3ff001000000000L & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
break;
case 1:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 9)
+ kind = 9;
jjCheckNAddTwoStates(1, 2);
break;
case 3:
@@ -759,136 +761,120 @@
case 4:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 9)
+ kind = 9;
jjCheckNAdd(4);
break;
case 5:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAddStates(4, 8);
+ if (curChar == 34)
+ jjCheckNAddStates(26, 28);
break;
case 6:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 9)
- kind = 9;
- jjCheckNAdd(6);
+ if ((0xfffffffbffffffffL & l) != 0L)
+ jjCheckNAddStates(26, 28);
break;
- case 7:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(7, 8);
- break;
case 8:
- if (curChar != 46)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
+ if ((0x8400000000L & l) != 0L)
+ jjCheckNAddStates(26, 28);
break;
case 9:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAddTwoStates(9, 10);
+ if (curChar == 34 && kind > 11)
+ kind = 11;
break;
+ case 10:
+ if (curChar == 39)
+ jjCheckNAddStates(23, 25);
+ break;
case 11:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(12);
+ if ((0xffffff7fffffffffL & l) != 0L)
+ jjCheckNAddStates(23, 25);
break;
- case 12:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 10)
- kind = 10;
- jjCheckNAdd(12);
- break;
case 13:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(13, 14);
+ if ((0x8400000000L & l) != 0L)
+ jjCheckNAddStates(23, 25);
break;
+ case 14:
+ if (curChar == 39 && kind > 11)
+ kind = 11;
+ break;
case 15:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(16);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 8)
+ kind = 8;
+ jjCheckNAddStates(18, 22);
break;
case 16:
if ((0x3ff000000000000L & l) == 0L)
break;
- if (kind > 10)
- kind = 10;
+ if (kind > 8)
+ kind = 8;
jjCheckNAdd(16);
break;
case 17:
- if (curChar == 34)
- jjCheckNAddStates(14, 18);
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(17, 18);
break;
case 18:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
+ if (curChar != 46)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddTwoStates(19, 20);
break;
- case 20:
- if (curChar == 34)
- jjCheckNAddStates(19, 21);
+ case 19:
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAddTwoStates(19, 20);
break;
case 21:
- if (curChar == 34 && kind > 12)
- kind = 12;
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(22);
break;
case 22:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(22, 23);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAdd(22);
break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 13)
- kind = 13;
+ case 23:
+ if ((0x3ff000000000000L & l) != 0L)
+ jjCheckNAddTwoStates(23, 24);
break;
case 25:
- if (curChar == 39)
- jjCheckNAddStates(9, 13);
+ if ((0x280000000000L & l) != 0L)
+ jjCheckNAdd(26);
break;
case 26:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
+ if ((0x3ff000000000000L & l) == 0L)
+ break;
+ if (kind > 9)
+ kind = 9;
+ jjCheckNAdd(26);
break;
- case 28:
- if (curChar == 39)
- jjCheckNAddStates(22, 24);
- break;
- case 29:
- if (curChar == 39 && kind > 12)
- kind = 12;
- break;
- case 30:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(30, 31);
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 33:
+ case 27:
if ((0x1800000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 34:
+ case 28:
if ((0x3ff001000000000L & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if ((0x3ff001000000000L & l) == 0L)
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -904,94 +890,73 @@
case 0:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 36:
+ case 30:
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
if ((0x7fffffe87fffffeL & l) != 0L)
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
break;
case 2:
if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 10:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 14:
- if ((0x2000000020L & l) != 0L)
jjAddStates(29, 30);
break;
- case 18:
+ case 6:
if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(19, 21);
+ jjCheckNAddStates(26, 28);
break;
- case 19:
+ case 7:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 20;
+ jjstateSet[jjnewStateCnt++] = 8;
break;
- case 20:
+ case 8:
if (curChar == 92)
- jjCheckNAddStates(19, 21);
+ jjCheckNAddStates(26, 28);
break;
- case 22:
+ case 11:
if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(31, 32);
+ jjCheckNAddStates(23, 25);
break;
- case 23:
+ case 12:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 24;
+ jjstateSet[jjnewStateCnt++] = 13;
break;
- case 24:
- case 32:
- if ((0xffffffffefffffffL & l) != 0L && kind > 13)
- kind = 13;
- break;
- case 26:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(22, 24);
- break;
- case 27:
+ case 13:
if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 28;
+ jjCheckNAddStates(23, 25);
break;
- case 28:
- if (curChar == 92)
- jjCheckNAddStates(22, 24);
+ case 20:
+ if ((0x2000000020L & l) != 0L)
+ jjAddStates(31, 32);
break;
- case 30:
- if ((0xffffffffefffffffL & l) != 0L)
+ case 24:
+ if ((0x2000000020L & l) != 0L)
jjAddStates(33, 34);
break;
- case 31:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 32;
- break;
- case 34:
+ case 28:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -1011,58 +976,45 @@
case 0:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAddTwoStates(34, 35);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAddTwoStates(28, 29);
break;
- case 36:
+ case 30:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
{
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
}
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
{
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
}
break;
- case 18:
+ case 6:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(19, 21);
+ jjAddStates(26, 28);
break;
- case 22:
+ case 11:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(31, 32);
+ jjAddStates(23, 25);
break;
- case 24:
- case 32:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 13)
- kind = 13;
- break;
- case 26:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(22, 24);
- break;
- case 30:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- jjAddStates(33, 34);
- break;
- case 34:
+ case 28:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 53)
- kind = 53;
- jjCheckNAdd(34);
+ if (kind > 51)
+ kind = 51;
+ jjCheckNAdd(28);
break;
- case 35:
+ case 29:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
- if (kind > 54)
- kind = 54;
- jjCheckNAdd(35);
+ if (kind > 52)
+ kind = 52;
+ jjCheckNAdd(29);
break;
default : break;
}
@@ -1075,16 +1027,16 @@
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
+ if ((i = jjnewStateCnt) == (startsAt = 30 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = {
- 0, 1, 3, 5, 6, 7, 8, 13, 14, 26, 27, 29, 30, 31, 18, 19,
- 21, 22, 23, 18, 19, 21, 26, 27, 29, 3, 4, 11, 12, 15, 16, 22,
- 23, 30, 31,
+ 0, 1, 3, 4, 2, 0, 1, 4, 2, 0, 1, 4, 5, 2, 0, 1,
+ 2, 6, 16, 17, 18, 23, 24, 11, 12, 14, 6, 7, 9, 3, 4, 21,
+ 22, 25, 26,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@@ -1122,12 +1074,12 @@
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
"", null, "\44\173", "\43\173", null, null, null, null, null, null, null, null,
-null, null, "\164\162\165\145", "\146\141\154\163\145", "\156\165\154\154", "\175",
-"\56", "\50", "\51", "\133", "\135", "\72", "\54", "\76", "\147\164", "\74",
-"\154\164", "\76\75", "\147\145", "\74\75", "\154\145", "\75\75", "\145\161", "\41\75",
-"\156\145", "\41", "\156\157\164", "\46\46", "\141\156\144", "\174\174", "\157\162",
-"\145\155\160\164\171", "\151\156\163\164\141\156\143\145\157\146", "\52", "\53", "\55", "\77", "\57",
-"\144\151\166", "\45", "\155\157\144", null, null, null, null, null, null, };
+"\164\162\165\145", "\146\141\154\163\145", "\156\165\154\154", "\175", "\56", "\50", "\51",
+"\133", "\135", "\72", "\54", "\76", "\147\164", "\74", "\154\164", "\76\75",
+"\147\145", "\74\75", "\154\145", "\75\75", "\145\161", "\41\75", "\156\145", "\41",
+"\156\157\164", "\46\46", "\141\156\144", "\174\174", "\157\162", "\145\155\160\164\171",
+"\151\156\163\164\141\156\143\145\157\146", "\52", "\53", "\55", "\77", "\57", "\144\151\166", "\45", "\155\157\144", null,
+null, null, null, null, null, };
/** Lexer state names. */
public static final String[] lexStateNames = {
@@ -1137,19 +1089,19 @@
/** Lex State array. */
public static final int[] jjnewLexState = {
- -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1,
};
static final long[] jjtoToken = {
- 0x47ffffffffff60fL,
+ 0x11ffffffffffb0fL,
};
static final long[] jjtoSkip = {
- 0x1f0L,
+ 0xf0L,
};
protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[36];
-private final int[] jjstateSet = new int[72];
+private final int[] jjrounds = new int[30];
+private final int[] jjstateSet = new int[60];
protected char curChar;
/** Constructor. */
public ELParserTokenManager(SimpleCharStream stream){
@@ -1176,7 +1128,7 @@
{
int i;
jjround = 0x80000001;
- for (i = 36; i-- > 0;)
+ for (i = 30; i-- > 0;)
jjrounds[i] = 0x80000000;
}
@@ -1263,9 +1215,9 @@
jjmatchedKind = 0x7fffffff;
jjmatchedPos = 0;
curPos = jjMoveStringLiteralDfa0_1();
- if (jjmatchedPos == 0 && jjmatchedKind > 58)
+ if (jjmatchedPos == 0 && jjmatchedKind > 56)
{
- jjmatchedKind = 58;
+ jjmatchedKind = 56;
}
break;
}
Modified: branches/2.1.x/java/org/apache/el/parser/ELParserTreeConstants.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ELParserTreeConstants.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ELParserTreeConstants.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ELParserTreeConstants.java Version 5.0 */
package org.apache.el.parser;
public interface ELParserTreeConstants
@@ -74,4 +74,4 @@
"Null",
};
}
-/* JavaCC - OriginalChecksum=bf4d2e0f35a3199e11bfd8303212d1ad (do not edit this line) */
+/* JavaCC - OriginalChecksum=f9dfeaba39219034209bcc010ceeafc5 (do not edit this line) */
Modified: branches/2.1.x/java/org/apache/el/parser/JJTELParserState.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/JJTELParserState.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/JJTELParserState.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,17 +1,17 @@
-/* Generated By:JavaCC: Do not edit this line. JJTELParserState.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. JJTELParserState.java Version 5.0 */
package org.apache.el.parser;
public class JJTELParserState {
- private java.util.List nodes;
- private java.util.List marks;
+ private java.util.List<Node> nodes;
+ private java.util.List<Integer> marks;
private int sp; // number of nodes on stack
private int mk; // current mark
private boolean node_created;
public JJTELParserState() {
- nodes = new java.util.ArrayList();
- marks = new java.util.ArrayList();
+ nodes = new java.util.ArrayList<Node>();
+ marks = new java.util.ArrayList<Integer>();
sp = 0;
mk = 0;
}
@@ -35,7 +35,7 @@
/* Returns the root node of the AST. It only makes sense to call
this after a successful parse. */
public Node rootNode() {
- return (Node)nodes.get(0);
+ return nodes.get(0);
}
/* Pushes a node on to the stack. */
@@ -48,14 +48,14 @@
stack. */
public Node popNode() {
if (--sp < mk) {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
}
- return (Node)nodes.remove(nodes.size()-1);
+ return nodes.remove(nodes.size()-1);
}
/* Returns the node currently on the top of the stack. */
public Node peekNode() {
- return (Node)nodes.get(nodes.size()-1);
+ return nodes.get(nodes.size()-1);
}
/* Returns the number of children on the stack in the current node
@@ -69,12 +69,12 @@
while (sp > mk) {
popNode();
}
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
}
public void openNodeScope(Node n) {
- marks.add(new Integer(mk));
+ marks.add(mk);
mk = sp;
n.jjtOpen();
}
@@ -85,7 +85,7 @@
made the children of the definite node. Then the definite node
is pushed on to the stack. */
public void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
while (num-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
@@ -105,7 +105,7 @@
public void closeNodeScope(Node n, boolean condition) {
if (condition) {
int a = nodeArity();
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
while (a-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
@@ -115,9 +115,9 @@
pushNode(n);
node_created = true;
} else {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
+ mk = marks.remove(marks.size()-1);
node_created = false;
}
}
}
-/* JavaCC - OriginalChecksum=302852ad347878d613824b11862fef15 (do not edit this line) */
+/* JavaCC - OriginalChecksum=70ac39f1e0e1eed7476e1dae2dfa25fa (do not edit this line) */
Modified: branches/2.1.x/java/org/apache/el/parser/Node.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/Node.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/Node.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -68,4 +68,5 @@
public void accept(NodeVisitor visitor) throws Exception;
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
+ public boolean isParametersProvided();
}
Modified: branches/2.1.x/java/org/apache/el/parser/ParseException.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/ParseException.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/ParseException.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
/* JavaCCOptions:KEEP_LINE_COL=null */
package org.apache.el.parser;
@@ -14,24 +14,24 @@
public class ParseException extends Exception {
/**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
* This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
* a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
+ * "expectedTokenSequences", and "tokenImage" set.
*/
public ParseException(Token currentTokenVal,
int[][] expectedTokenSequencesVal,
String[] tokenImageVal
)
{
- super("");
- specialConstructor = true;
+ super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
currentToken = currentTokenVal;
expectedTokenSequences = expectedTokenSequencesVal;
tokenImage = tokenImageVal;
@@ -49,21 +49,13 @@
public ParseException() {
super();
- specialConstructor = false;
}
/** Constructor with message. */
public ParseException(String message) {
super(message);
- specialConstructor = false;
}
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
/**
* This is the last token that has been consumed successfully. If
@@ -87,19 +79,16 @@
public String[] tokenImage;
/**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
+ * It uses "currentToken" and "expectedTokenSequences" to generate a parse
* error message and returns it. If this object has been created
* due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
+ * from the parser) the correct error message
* gets displayed.
*/
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
- }
+ private static String initialise(Token currentToken,
+ int[][] expectedTokenSequences,
+ String[] tokenImage) {
+ String eol = System.getProperty("line.separator", "\n");
StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
@@ -149,7 +138,7 @@
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- protected String add_escapes(String str) {
+ static String add_escapes(String str) {
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
@@ -195,4 +184,4 @@
}
}
-/* JavaCC - OriginalChecksum=8e2ccd67f74aad88b27a1262c61e9157 (do not edit this line) */
+/* JavaCC - OriginalChecksum=87586a39aa89f164889cc59bc6a7e7ad (do not edit this line) */
Modified: branches/2.1.x/java/org/apache/el/parser/SimpleCharStream.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/SimpleCharStream.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/SimpleCharStream.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,5 +1,5 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false */
+/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.apache.el.parser;
/**
@@ -38,192 +38,192 @@
protected void ExpandBuff(boolean wrapAround)
{
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
+ char[] newbuffer = new char[bufsize + 2048];
+ int newbufline[] = new int[bufsize + 2048];
+ int newbufcolumn[] = new int[bufsize + 2048];
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
+ try
+ {
+ if (wrapAround)
+ {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
+ buffer = newbuffer;
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
+ bufline = newbufline;
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
+ bufcolumn = newbufcolumn;
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
+ maxNextCharInd = (bufpos += (bufsize - tokenBegin));
+ }
+ else
+ {
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
+ buffer = newbuffer;
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
+ bufline = newbufline;
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
+ bufcolumn = newbufcolumn;
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
+ maxNextCharInd = (bufpos -= tokenBegin);
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new Error(t.getMessage());
+ }
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
+ bufsize += 2048;
+ available = bufsize;
+ tokenBegin = 0;
}
protected void FillBuff() throws java.io.IOException
{
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
+ if (maxNextCharInd == available)
+ {
+ if (available == bufsize)
+ {
+ if (tokenBegin > 2048)
{
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
- }
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
+ bufpos = maxNextCharInd = 0;
+ available = tokenBegin;
}
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
+ else if (tokenBegin < 0)
+ bufpos = maxNextCharInd = 0;
else
- available = tokenBegin;
- }
+ ExpandBuff(false);
+ }
+ else if (available > tokenBegin)
+ available = bufsize;
+ else if ((tokenBegin - available) < 2048)
+ ExpandBuff(true);
+ else
+ available = tokenBegin;
+ }
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd,
- available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
- tokenBegin = bufpos;
- throw e;
- }
+ int i;
+ try {
+ if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1)
+ {
+ inputStream.close();
+ throw new java.io.IOException();
+ }
+ else
+ maxNextCharInd += i;
+ return;
+ }
+ catch(java.io.IOException e) {
+ --bufpos;
+ backup(0);
+ if (tokenBegin == -1)
+ tokenBegin = bufpos;
+ throw e;
+ }
}
/** Start. */
public char BeginToken() throws java.io.IOException
{
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
+ tokenBegin = -1;
+ char c = readChar();
+ tokenBegin = bufpos;
- return c;
+ return c;
}
protected void UpdateLineColumn(char c)
{
- column++;
+ column++;
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
+ if (prevCharIsLF)
+ {
+ prevCharIsLF = false;
+ line += (column = 1);
+ }
+ else if (prevCharIsCR)
+ {
+ prevCharIsCR = false;
+ if (c == '\n')
+ {
+ prevCharIsLF = true;
+ }
+ else
line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
+ }
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (tabSize - (column % tabSize));
- break;
- default :
- break;
- }
+ switch (c)
+ {
+ case '\r' :
+ prevCharIsCR = true;
+ break;
+ case '\n' :
+ prevCharIsLF = true;
+ break;
+ case '\t' :
+ column--;
+ column += (tabSize - (column % tabSize));
+ break;
+ default :
+ break;
+ }
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
+ bufline[bufpos] = line;
+ bufcolumn[bufpos] = column;
}
/** Read a character. */
public char readChar() throws java.io.IOException
{
- if (inBuf > 0)
- {
- --inBuf;
+ if (inBuf > 0)
+ {
+ --inBuf;
- if (++bufpos == bufsize)
- bufpos = 0;
+ if (++bufpos == bufsize)
+ bufpos = 0;
- return buffer[bufpos];
- }
+ return buffer[bufpos];
+ }
- if (++bufpos >= maxNextCharInd)
- FillBuff();
+ if (++bufpos >= maxNextCharInd)
+ FillBuff();
- char c = buffer[bufpos];
+ char c = buffer[bufpos];
- UpdateLineColumn(c);
- return c;
+ UpdateLineColumn(c);
+ return c;
}
+ @Deprecated
/**
* @deprecated
* @see #getEndColumn
*/
public int getColumn() {
- return bufcolumn[bufpos];
+ return bufcolumn[bufpos];
}
+ @Deprecated
/**
* @deprecated
* @see #getEndLine
*/
public int getLine() {
- return bufline[bufpos];
+ return bufline[bufpos];
}
/** Get token end column number. */
public int getEndColumn() {
- return bufcolumn[bufpos];
+ return bufcolumn[bufpos];
}
/** Get token end line number. */
@@ -233,12 +233,12 @@
/** Get token beginning column number. */
public int getBeginColumn() {
- return bufcolumn[tokenBegin];
+ return bufcolumn[tokenBegin];
}
/** Get token beginning line number. */
public int getBeginLine() {
- return bufline[tokenBegin];
+ return bufline[tokenBegin];
}
/** Backup a number of characters. */
@@ -246,7 +246,7 @@
inBuf += amount;
if ((bufpos -= amount) < 0)
- bufpos += bufsize;
+ bufpos += bufsize;
}
/** Constructor. */
@@ -267,13 +267,13 @@
public SimpleCharStream(java.io.Reader dstream, int startline,
int startcolumn)
{
- this(dstream, startline, startcolumn, 4096);
+ this(dstream, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.Reader dstream)
{
- this(dstream, 1, 1, 4096);
+ this(dstream, 1, 1, 4096);
}
/** Reinitialise. */
@@ -300,124 +300,124 @@
public void ReInit(java.io.Reader dstream, int startline,
int startcolumn)
{
- ReInit(dstream, startline, startcolumn, 4096);
+ ReInit(dstream, startline, startcolumn, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.Reader dstream)
{
- ReInit(dstream, 1, 1, 4096);
+ ReInit(dstream, 1, 1, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
{
- this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+ this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
- this(dstream, encoding, startline, startcolumn, 4096);
+ this(dstream, encoding, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, int startline,
int startcolumn)
{
- this(dstream, startline, startcolumn, 4096);
+ this(dstream, startline, startcolumn, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
{
- this(dstream, encoding, 1, 1, 4096);
+ this(dstream, encoding, 1, 1, 4096);
}
/** Constructor. */
public SimpleCharStream(java.io.InputStream dstream)
{
- this(dstream, 1, 1, 4096);
+ this(dstream, 1, 1, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
{
- ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
+ ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn, int buffersize)
{
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
{
- ReInit(dstream, encoding, 1, 1, 4096);
+ ReInit(dstream, encoding, 1, 1, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream)
{
- ReInit(dstream, 1, 1, 4096);
+ ReInit(dstream, 1, 1, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, String encoding, int startline,
int startcolumn) throws java.io.UnsupportedEncodingException
{
- ReInit(dstream, encoding, startline, startcolumn, 4096);
+ ReInit(dstream, encoding, startline, startcolumn, 4096);
}
/** Reinitialise. */
public void ReInit(java.io.InputStream dstream, int startline,
int startcolumn)
{
- ReInit(dstream, startline, startcolumn, 4096);
+ ReInit(dstream, startline, startcolumn, 4096);
}
/** Get token literal value. */
public String GetImage()
{
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
+ if (bufpos >= tokenBegin)
+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
+ else
+ return new String(buffer, tokenBegin, bufsize - tokenBegin) +
+ new String(buffer, 0, bufpos + 1);
}
/** Get the suffix. */
public char[] GetSuffix(int len)
{
- char[] ret = new char[len];
+ char[] ret = new char[len];
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
+ if ((bufpos + 1) >= len)
+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
+ else
+ {
+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
+ len - bufpos - 1);
+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
+ }
- return ret;
+ return ret;
}
/** Reset buffer when finished. */
public void Done()
{
- buffer = null;
- bufline = null;
- bufcolumn = null;
+ buffer = null;
+ bufline = null;
+ bufcolumn = null;
}
/**
@@ -425,48 +425,47 @@
*/
public void adjustBeginLineColumn(int newLine, int newCol)
{
- int start = tokenBegin;
- int len;
+ int start = tokenBegin;
+ int len;
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
+ if (bufpos >= tokenBegin)
+ {
+ len = bufpos - tokenBegin + inBuf + 1;
+ }
+ else
+ {
+ len = bufsize - tokenBegin + bufpos + 1 + inBuf;
+ }
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
+ int i = 0, j = 0, k = 0;
+ int nextColDiff = 0, columnDiff = 0;
- while (i < len &&
- bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
+ while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
+ {
+ bufline[j] = newLine;
+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
+ bufcolumn[j] = newCol + columnDiff;
+ columnDiff = nextColDiff;
+ i++;
+ }
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
+ if (i < len)
+ {
+ bufline[j] = newLine++;
+ bufcolumn[j] = newCol + columnDiff;
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
+ while (i++ < len)
+ {
+ if (bufline[j = start % bufsize] != bufline[++start % bufsize])
+ bufline[j] = newLine++;
+ else
+ bufline[j] = newLine;
+ }
+ }
- line = bufline[j];
- column = bufcolumn[j];
+ line = bufline[j];
+ column = bufcolumn[j];
}
}
-/* JavaCC - OriginalChecksum=818cc1c71ac884d7a3756c5d760b3c8f (do not edit this line) */
+/* JavaCC - OriginalChecksum=9ba0db3918bffb8019f00da1e421f339 (do not edit this line) */
Modified: branches/2.1.x/java/org/apache/el/parser/SimpleNode.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/SimpleNode.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/SimpleNode.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -157,4 +157,9 @@
public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException {
throw new UnsupportedOperationException();
}
+
+ public boolean isParametersProvided() {
+ return false;
+ }
+
}
Modified: branches/2.1.x/java/org/apache/el/parser/Token.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/Token.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/Token.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,14 +1,21 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null */
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.apache.el.parser;
/**
* Describes the input token stream.
*/
-public class Token {
+public class Token implements java.io.Serializable {
/**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
* An integer that describes the kind of this token. This numbering
* system is determined by JavaCCParser, and a table of these numbers is
* stored in the file ...Constants.java.
@@ -75,7 +82,7 @@
*/
public Token(int kind)
{
- this(kind, null);
+ this(kind, null);
}
/**
@@ -83,8 +90,8 @@
*/
public Token(int kind, String image)
{
- this.kind = kind;
- this.image = image;
+ this.kind = kind;
+ this.image = image;
}
/**
@@ -92,7 +99,7 @@
*/
public String toString()
{
- return image;
+ return image;
}
/**
@@ -109,16 +116,16 @@
*/
public static Token newToken(int ofKind, String image)
{
- switch(ofKind)
- {
- default : return new Token(ofKind, image);
- }
+ switch(ofKind)
+ {
+ default : return new Token(ofKind, image);
+ }
}
public static Token newToken(int ofKind)
{
- return newToken(ofKind, null);
+ return newToken(ofKind, null);
}
}
-/* JavaCC - OriginalChecksum=7feb61b391e60d3d8ef1a9482b26365e (do not edit this line) */
+/* JavaCC - OriginalChecksum=3fc97649fffa8b13e1e03af022020b2f (do not edit this line) */
Modified: branches/2.1.x/java/org/apache/el/parser/TokenMgrError.java
===================================================================
--- branches/2.1.x/java/org/apache/el/parser/TokenMgrError.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/el/parser/TokenMgrError.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 4.1 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
/* JavaCCOptions: */
package org.apache.el.parser;
@@ -6,135 +6,142 @@
public class TokenMgrError extends Error
{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
+ /**
+ * The version identifier for this Serializable class.
+ * Increment only if the <i>serialized</i> form of the
+ * class changes.
+ */
+ private static final long serialVersionUID = 1L;
- /**
- * Lexical error occurred.
- */
- static final int LEXICAL_ERROR = 0;
+ /*
+ * Ordinals for various reasons why an Error of this type can be thrown.
+ */
- /**
- * An attempt was made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
+ /**
+ * Lexical error occurred.
+ */
+ static final int LEXICAL_ERROR = 0;
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
+ /**
+ * An attempt was made to create a second instance of a static token manager.
+ */
+ static final int STATIC_LEXER_ERROR = 1;
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
+ /**
+ * Tried to change to an invalid lexical state.
+ */
+ static final int INVALID_LEXICAL_STATE = 2;
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
+ /**
+ * Detected (and bailed out of) an infinite loop in the token manager.
+ */
+ static final int LOOP_DETECTED = 3;
- /**
- * Replaces unprintable characters by their escaped (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
+ /**
+ * Indicates the reason why the exception is thrown. It will have
+ * one of the above 4 values.
+ */
+ int errorCode;
+
+ /**
+ * Replaces unprintable characters by their escaped (or unicode escaped)
+ * equivalents in the given string
+ */
+ protected static final String addEscapes(String str) {
+ StringBuffer retval = new StringBuffer();
+ char ch;
+ for (int i = 0; i < str.length(); i++) {
+ switch (str.charAt(i))
+ {
+ case 0 :
+ continue;
+ case '\b':
+ retval.append("\\b");
+ continue;
+ case '\t':
+ retval.append("\\t");
+ continue;
+ case '\n':
+ retval.append("\\n");
+ continue;
+ case '\f':
+ retval.append("\\f");
+ continue;
+ case '\r':
+ retval.append("\\r");
+ continue;
+ case '\"':
+ retval.append("\\\"");
+ continue;
+ case '\'':
+ retval.append("\\\'");
+ continue;
+ case '\\':
+ retval.append("\\\\");
+ continue;
+ default:
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
+ String s = "0000" + Integer.toString(ch, 16);
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+ } else {
+ retval.append(ch);
+ }
+ continue;
}
- return retval.toString();
- }
+ }
+ return retval.toString();
+ }
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexical error
- * curLexState : lexical state in which this error occurred
- * errorLine : line number when the error occurred
- * errorColumn : column number when the error occurred
- * errorAfter : prefix that was seen before this error occurred
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
+ /**
+ * Returns a detailed message for the Error when it is thrown by the
+ * token manager to indicate a lexical error.
+ * Parameters :
+ * EOFSeen : indicates if EOF caused the lexical error
+ * curLexState : lexical state in which this error occurred
+ * errorLine : line number when the error occurred
+ * errorColumn : column number when the error occurred
+ * errorAfter : prefix that was seen before this error occurred
+ * curchar : the offending character
+ * Note: You can customize the lexical error message by modifying this method.
+ */
+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
+ return("Lexical error at line " +
+ errorLine + ", column " +
+ errorColumn + ". Encountered: " +
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
+ "after : \"" + addEscapes(errorAfter) + "\"");
+ }
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
+ /**
+ * You can also modify the body of this method to customize your error messages.
+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
+ * of end-users concern, so you can return something like :
+ *
+ * "Internal Error : Please file a bug report .... "
+ *
+ * from this method for such cases in the release version of your parser.
+ */
+ public String getMessage() {
+ return super.getMessage();
+ }
- /*
- * Constructors of various flavors follow.
- */
+ /*
+ * Constructors of various flavors follow.
+ */
- /** No arg constructor. */
- public TokenMgrError() {
- }
+ /** No arg constructor. */
+ public TokenMgrError() {
+ }
- /** Constructor with message and reason. */
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
+ /** Constructor with message and reason. */
+ public TokenMgrError(String message, int reason) {
+ super(message);
+ errorCode = reason;
+ }
- /** Full Constructor. */
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
- }
+ /** Full Constructor. */
+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
+ }
}
-/* JavaCC - OriginalChecksum=6b523b4a5c49e1ee9e58afea685a63ce (do not edit this line) */
+/* JavaCC - OriginalChecksum=de3ff0bacfb0fe749cc8eaf56ae82fea (do not edit this line) */
Added: branches/2.1.x/java/org/apache/jasper/compiler/AttributeParser.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/compiler/AttributeParser.java (rev 0)
+++ branches/2.1.x/java/org/apache/jasper/compiler/AttributeParser.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -0,0 +1,333 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jasper.compiler;
+
+/**
+ * Converts a JSP attribute value into the unquoted equivalent. The attribute
+ * may contain EL expressions, in which case care needs to be taken to avoid any
+ * ambiguities. For example, consider the attribute values "${1+1}" and
+ * "\${1+1}". After unquoting, both appear as "${1+1}" but the first should
+ * evaluate to "2" and the second to "${1+1}". Literal \, $ and # need special
+ * treatment to ensure there is no ambiguity. The JSP attribute unquoting
+ * covers \\, \", \', \$, \#, %\>, <\%, ' and "
+ */
+public class AttributeParser {
+
+ /* System property that controls if the strict quoting rules are applied. */
+ private static final boolean STRICT_QUOTE_ESCAPING = Boolean.valueOf(
+ System.getProperty(
+ "org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING",
+ "true")).booleanValue();
+
+ /**
+ * Parses the provided input String as a JSP attribute and returns an
+ * unquoted value.
+ *
+ * @param input The input.
+ * @param quote The quote character for the attribute or 0 for
+ * scripting expressions.
+ * @param isELIgnored Is expression language being ignored on the page
+ * where the JSP attribute is defined.
+ * @return An unquoted JSP attribute that, if it contains
+ * expression language can be safely passed to the EL
+ * processor without fear of ambiguity.
+ */
+ public static String getUnquoted(String input, char quote,
+ boolean isELIgnored) {
+ return (new AttributeParser(input, quote, isELIgnored,
+ STRICT_QUOTE_ESCAPING)).getUnquoted();
+ }
+
+ /**
+ * Provided solely for unit test purposes and allows per call overriding of
+ * the STRICT_QUOTE_ESCAPING system property.
+ *
+ * @param input The input.
+ * @param quote The quote character for the attribute or 0 for
+ * scripting expressions.
+ * @param isELIgnored Is expression language being ignored on the page
+ * where the JSP attribute is defined.
+ * @param strict The value to use for STRICT_QUOTE_ESCAPING.
+ * @return An unquoted JSP attribute that, if it contains
+ * expression language can be safely passed to the EL
+ * processor without fear of ambiguity.
+ */
+ protected static String getUnquoted(String input, char quote,
+ boolean isELIgnored, boolean strict) {
+ return (new AttributeParser(input, quote, isELIgnored,
+ strict)).getUnquoted();
+ }
+
+ /* The quoted input string. */
+ private final String input;
+
+ /* The quote used for the attribute - null for scripting expressions. */
+ private final char quote;
+
+ /* Is expression language being ignored - affects unquoting. \$ and \# are
+ * treated as literals rather than quoted values. */
+ private final boolean isELIgnored;
+
+ /* Overrides the STRICT_QUOTE_ESCAPING. Used for Unit tests only. */
+ private final boolean strict;
+
+ /* The type ($ or #) of expression. Literals have a type of null. */
+ private char type;
+
+ /* The length of the quoted input string. */
+ private final int size;
+
+ /* Tracks the current position of the parser in the input String. */
+ private int i = 0;
+
+ /* Indicates if the last character returned by nextChar() was escaped. */
+ private boolean lastChEscaped = false;
+
+ /* The unquoted result. */
+ private StringBuilder result;
+
+
+ /**
+ * For test purposes.
+ * @param input
+ * @param quote
+ * @param strict
+ */
+ private AttributeParser(String input, char quote,
+ boolean isELIgnored, boolean strict) {
+ this.input = input;
+ this.quote = quote;
+ // If quote is null this is a scriptign expressions and any EL syntax
+ // should be ignored
+ this.isELIgnored = isELIgnored || (quote == 0);
+ this.strict = strict;
+ this.type = getType(input);
+ this.size = input.length();
+ result = new StringBuilder(size);
+ }
+
+ /*
+ * Work through input looking for literals and expressions until the input
+ * has all been read.
+ */
+ private String getUnquoted() {
+ while (i < size) {
+ parseLiteral();
+ parseEL();
+ }
+ return result.toString();
+ }
+
+ /*
+ * This method gets the next unquoted character and looks for
+ * - literals that need to be converted for EL processing
+ * \ -> type{'\\'}
+ * $ -> type{'$'}
+ * # -> type{'$'}
+ * - start of EL
+ * ${
+ * #{
+ * Note all the examples above *do not* include the escaping required to use
+ * the values in Java code.
+ */
+ private void parseLiteral() {
+ boolean foundEL = false;
+ while (i < size && !foundEL) {
+ char ch = nextChar();
+ if (!isELIgnored && ch == '\\') {
+ if (type == 0) {
+ type = '$';
+ }
+ result.append(type);
+ result.append("{'\\\\'}");
+ } else if (!isELIgnored && ch == '$' && lastChEscaped){
+ if (type == 0) {
+ type = '$';
+ }
+ result.append(type);
+ result.append("{'$'}");
+ } else if (!isELIgnored && ch == '#' && lastChEscaped){
+ if (type == 0) {
+ type = '$';
+ }
+ result.append(type);
+ result.append("{'#'}");
+ } else if (ch == type){
+ if (i < size) {
+ char next = input.charAt(i);
+ if (next == '{') {
+ foundEL = true;
+ // Move back to start of EL
+ i--;
+ } else {
+ result.append(ch);
+ }
+ } else {
+ result.append(ch);
+ }
+ } else {
+ result.append(ch);
+ }
+ }
+ }
+
+ /*
+ * For EL need to unquote everything but no need to convert anything. The
+ * EL is terminated by '}'. The only other valid location for '}' is inside
+ * a StringLiteral. The literals are delimited by '\'' or '\"'. The only
+ * other valid location for '\'' or '\"' is also inside a StringLiteral. A
+ * quote character inside a StringLiteral must be escaped if the same quote
+ * character is used to delimit the StringLiteral.
+ */
+ private void parseEL() {
+ boolean endEL = false;
+ boolean insideLiteral = false;
+ while (i < size && !endEL) {
+ char literalQuote = '\'';
+ char ch = nextChar();
+ if (ch == '\'' || ch == '\"') {
+ if (insideLiteral) {
+ if (literalQuote == ch) {
+ insideLiteral = false;
+ }
+ } else {
+ insideLiteral = true;
+ literalQuote = ch;
+ }
+ result.append(ch);
+ } else if (ch == '\\') {
+ result.append(ch);
+ if (insideLiteral && size < i) {
+ ch = nextChar();
+ result.append(ch);
+ }
+ } else if (ch == '}') {
+ if (!insideLiteral) {
+ endEL = true;
+ }
+ result.append(ch);
+ } else {
+ result.append(ch);
+ }
+ }
+ }
+
+ /*
+ * Returns the nest unquoted character and sets the lastChEscaped flag to
+ * indicate if it was quoted/escaped or not.
+ * ' is always unquoted to '
+ * " is always unquoted to "
+ * \" is always unquoted to "
+ * \' is always unquoted to '
+ * \\ is always unquoted to \
+ * \$ is unquoted to $ if EL is not being ignored
+ * \# is unquoted to # if EL is not being ignored
+ * <\% is always unquoted to <%
+ * %\> is always unquoted to %>
+ */
+ private char nextChar() {
+ lastChEscaped = false;
+ char ch = input.charAt(i);
+
+ if (ch == '&') {
+ if (i + 5 < size && input.charAt(i + 1) == 'a' &&
+ input.charAt(i + 2) == 'p' && input.charAt(i + 3) == 'o' &&
+ input.charAt(i + 4) == 's' && input.charAt(i + 5) == ';') {
+ ch = '\'';
+ i += 6;
+ } else if (i + 5 < size && input.charAt(i + 1) == 'q' &&
+ input.charAt(i + 2) == 'u' && input.charAt(i + 3) == 'o' &&
+ input.charAt(i + 4) == 't' && input.charAt(i + 5) == ';') {
+ ch = '\"';
+ i += 6;
+ } else {
+ ++i;
+ }
+ } else if (ch == '\\' && i + 1 < size) {
+ ch = input.charAt(i + 1);
+ if (ch == '\\' || ch == '\"' || ch == '\'' ||
+ (!isELIgnored && (ch == '$' || ch == '#'))) {
+ i += 2;
+ lastChEscaped = true;
+ } else {
+ ch = '\\';
+ ++i;
+ }
+ } else if (ch == '<' && (i + 2 < size) && input.charAt(i + 1) == '\\' &&
+ input.charAt(i + 2) == '%') {
+ // Note this is a hack since nextChar only returns a single char
+ // It is safe since <% does not require special treatment for EL
+ // or for literals
+ result.append('<');
+ i+=3;
+ return '%';
+ } else if (ch == '%' && i + 2 < size && input.charAt(i + 1) == '\\' &&
+ input.charAt(i + 2) == '>') {
+ // Note this is a hack since nextChar only returns a single char
+ // It is safe since %> does not require special treatment for EL
+ // or for literals
+ result.append('%');
+ i+=3;
+ return '>';
+ } else if (ch == quote && strict) {
+ String msg = Localizer.getMessage("jsp.error.attribute.noescape",
+ input, ""+ quote);
+ throw new IllegalArgumentException(msg);
+ } else {
+ ++i;
+ }
+
+ return ch;
+ }
+
+ /*
+ * Determines the type of expression by looking for the first unquoted ${
+ * or #{.
+ */
+ private char getType(String value) {
+ if (value == null) {
+ return 0;
+ }
+
+ if (isELIgnored) {
+ return 0;
+ }
+
+ int j = 0;
+ int len = value.length();
+ char current;
+
+ while (j < len) {
+ current = value.charAt(j);
+ if (current == '\\') {
+ // Escape character - skip a character
+ j++;
+ } else if (current == '#') {
+ if (j < (len -1) && value.charAt(j + 1) == '{') {
+ return '#';
+ }
+ } else if (current == '$') {
+ if (j < (len - 1) && value.charAt(j + 1) == '{') {
+ return '$';
+ }
+ }
+ j++;
+ }
+ return 0;
+ }
+}
Modified: branches/2.1.x/java/org/apache/jasper/compiler/ELParser.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/compiler/ELParser.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/jasper/compiler/ELParser.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -31,6 +31,7 @@
public class ELParser {
private Token curToken; // current token
+ private Token prevToken; // previous token
private ELNode.Nodes expr;
@@ -118,27 +119,28 @@
* arguments
*/
private boolean parseFunction() {
- if (!(curToken instanceof Id) || isELReserved(curToken.toString())) {
+ if (!(curToken instanceof Id) || isELReserved(curToken.toString()) ||
+ prevToken instanceof Char && prevToken.toChar() == '.') {
return false;
}
String s1 = null; // Function prefix
String s2 = curToken.toString(); // Function name
int mark = getIndex();
if (hasNext()) {
- Token t = nextToken();
- if (t.toChar() == ':') {
+ curToken = nextToken();
+ if (curToken.toChar() == ':') {
if (hasNext()) {
Token t2 = nextToken();
if (t2 instanceof Id) {
s1 = s2;
s2 = t2.toString();
if (hasNext()) {
- t = nextToken();
+ curToken = nextToken();
}
}
}
}
- if (t.toChar() == '(') {
+ if (curToken.toChar() == '(') {
ELexpr.add(new ELNode.Function(s1, s2));
return true;
}
@@ -223,6 +225,7 @@
* @return The next token in the EL expression buffer.
*/
private Token nextToken() {
+ prevToken = curToken;
skipSpaces();
if (hasNextChar()) {
char ch = nextChar();
Modified: branches/2.1.x/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/compiler/Generator.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/jasper/compiler/Generator.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -813,8 +813,8 @@
}
return v;
} else if (attr.isELInterpreterInput()) {
- v = attributeValueWithEL(this.isTagFile, v, expectedType,
- attr.getEL().getMapName());
+ v = JspUtil.interpreterCall(this.isTagFile, v, expectedType,
+ attr.getEL().getMapName(), false);
if (encode) {
return "org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("
+ v + ", request.getCharacterEncoding())";
@@ -832,72 +832,6 @@
}
- /*
- * When interpreting the EL attribute value, literals outside the EL
- * must not be unescaped but the EL processor will unescape them.
- * Therefore, make sure only the EL expressions are processed by the EL
- * processor.
- */
- private String attributeValueWithEL(boolean isTag, String tx,
- Class<?> expectedType, String mapName) {
- if (tx==null) return null;
- Class<?> type = expectedType;
- int size = tx.length();
- StringBuffer output = new StringBuffer(size);
- boolean el = false;
- int i = 0;
- int mark = 0;
- char ch;
-
- while(i < size){
- ch = tx.charAt(i);
-
- // Start of an EL expression
- if (!el && i+1 < size && ch == '$' && tx.charAt(i+1)=='{') {
- if (mark < i) {
- if (output.length() > 0) {
- output.append(" + ");
- // Composite expression - must coerce to String
- type = String.class;
- }
- output.append(quote(tx.substring(mark, i)));
- }
- mark = i;
- el = true;
- i += 2;
- } else if (ch=='\\' && i+1 < size &&
- (tx.charAt(i+1)=='$' || tx.charAt(i+1)=='}')) {
- // Skip an escaped $ or }
- i += 2;
- } else if (el && ch=='}') {
- // End of an EL expression
- if (output.length() > 0) {
- output.append(" + ");
- // Composite expression - must coerce to String
- type = String.class;
- }
- output.append(
- JspUtil.interpreterCall(isTag,
- tx.substring(mark, i+1), type,
- mapName, false));
- mark = i + 1;
- el = false;
- ++i;
- } else {
- // Nothing to see here - move to next character
- ++i;
- }
- }
- if (!el && mark < i) {
- if (output.length() > 0) {
- output.append(" + ");
- }
- output.append(quote(tx.substring(mark, i)));
- }
- return output.toString();
- }
-
-
/**
* Prints the attribute value specified in the param action, in the form
* of name=value string.
@@ -2914,8 +2848,8 @@
// run attrValue through the expression interpreter
String mapName = (attr.getEL() != null) ? attr.getEL()
.getMapName() : null;
- attrValue = attributeValueWithEL(this.isTagFile,
- attrValue, c[0], mapName);
+ attrValue = JspUtil.interpreterCall(this.isTagFile, attrValue,
+ c[0], mapName, false);
}
} else {
attrValue = convertString(c[0], attrValue, localName,
Modified: branches/2.1.x/java/org/apache/jasper/compiler/Parser.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/compiler/Parser.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/jasper/compiler/Parser.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -74,11 +74,6 @@
private static final String JAVAX_BODY_CONTENT_TEMPLATE_TEXT = "JAVAX_BODY_CONTENT_TEMPLATE_TEXT";
- private static final boolean STRICT_QUOTE_ESCAPING = Boolean.valueOf(
- System.getProperty(
- "org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING",
- "true")).booleanValue();
-
/**
* The constructor
*/
@@ -245,66 +240,25 @@
err.jspError(start, "jsp.error.attribute.unterminated", watch);
}
- String ret = parseQuoted(start, reader.getText(start, stop),
- watch.charAt(watch.length() - 1));
+ String ret = null;
+ try {
+ char quote = 0;
+ if (watch.length() == 1) {
+ quote = watch.charAt(0);
+ }
+ ret = AttributeParser.getUnquoted(reader.getText(start, stop),
+ quote, pageInfo.isELIgnored());
+ } catch (IllegalArgumentException iae) {
+ err.jspError(start, iae.getMessage());
+ }
if (watch.length() == 1) // quote
return ret;
- // putback delimiter '<%=' and '%>', since they are needed if the
+ // Put back delimiter '<%=' and '%>', since they are needed if the
// attribute does not allow RTexpression.
return "<%=" + ret + "%>";
}
- /**
- * QuotedChar ::= ''' | '"' | '\\' | '\"' | "\'" | '\>' | '\$' |
- * Char
- */
- private String parseQuoted(Mark start, String tx, char quote)
- throws JasperException {
- StringBuffer buf = new StringBuffer();
- int size = tx.length();
- int i = 0;
- while (i < size) {
- char ch = tx.charAt(i);
- if (ch == '&') {
- if (i + 5 < size && tx.charAt(i + 1) == 'a'
- && tx.charAt(i + 2) == 'p' && tx.charAt(i + 3) == 'o'
- && tx.charAt(i + 4) == 's' && tx.charAt(i + 5) == ';') {
- buf.append('\'');
- i += 6;
- } else if (i + 5 < size && tx.charAt(i + 1) == 'q'
- && tx.charAt(i + 2) == 'u' && tx.charAt(i + 3) == 'o'
- && tx.charAt(i + 4) == 't' && tx.charAt(i + 5) == ';') {
- buf.append('"');
- i += 6;
- } else {
- buf.append(ch);
- ++i;
- }
- } else if (ch == '\\' && i + 1 < size) {
- ch = tx.charAt(i + 1);
- if (ch == '\\' || ch == '\"' || ch == '\'' || ch == '>') {
- // \ " and ' are always unescaped regardless of if they are
- // inside or outside of an EL expression. JSP.1.6 takes
- // precedence over JSP.1.3.10 (confirmed with EG).
- buf.append(ch);
- i += 2;
- } else {
- buf.append('\\');
- ++i;
- }
- } else if (ch == quote && STRICT_QUOTE_ESCAPING) {
- // Unescaped quote character
- err.jspError(start, "jsp.error.attribute.noescape", tx,
- "" + quote);
- } else {
- buf.append(ch);
- ++i;
- }
- }
- return buf.toString();
- }
-
private String parseScriptText(String tx) {
CharArrayWriter cw = new CharArrayWriter();
int size = tx.length();
Modified: branches/2.1.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2011-08-10 09:49:32 UTC (rev 1806)
@@ -51,7 +51,7 @@
private final static String KEY = JspApplicationContextImpl.class.getName();
- private final static ExpressionFactory expressionFactory = new ExpressionFactoryImpl();
+ private final static ExpressionFactory expressionFactory = new ExpressionFactoryImpl();
private final List<ELContextListener> contextListeners = new ArrayList<ELContextListener>();
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2011-08-09 20:37:06 UTC (rev 1805)
+++ branches/2.1.x/webapps/docs/changelog.xml 2011-08-10 09:49:32 UTC (rev 1806)
@@ -35,6 +35,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ EL escaping fixes. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+
</section>
<section name="JBoss Web 2.1.11.GA (remm)">
13 years, 4 months
JBossWeb SVN: r1805 - branches.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2011-08-09 16:37:06 -0400 (Tue, 09 Aug 2011)
New Revision: 1805
Added:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6921/
Log:
Create JBPAPP-6921 patch branch from JBOSSWEB_2_1_7_GA tag
13 years, 4 months
JBossWeb SVN: r1804 - branches.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2011-08-09 16:36:08 -0400 (Tue, 09 Aug 2011)
New Revision: 1804
Removed:
branches/JBOSSWEB_JBOSSWEB_2_1_7_GA_JBPAPP-6921/
Log:
Delete incorrectly named patch branch.
13 years, 4 months
JBossWeb SVN: r1803 - branches.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2011-08-09 16:34:03 -0400 (Tue, 09 Aug 2011)
New Revision: 1803
Added:
branches/JBOSSWEB_JBOSSWEB_2_1_7_GA_JBPAPP-6921/
Log:
Create JBPAPP-6921 patch branch from JBOSSWEB_2_1_7_GA tag
13 years, 4 months
JBossWeb SVN: r1802 - branches.
by jbossweb-commits@lists.jboss.org
Author: mmillson
Date: 2011-08-05 11:54:11 -0400 (Fri, 05 Aug 2011)
New Revision: 1802
Removed:
branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/
Log:
Remove incorrect branch for [JBPAPP-6725].
13 years, 4 months
JBossWeb SVN: r1801 - branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/java/org/apache/catalina/authenticator.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-08-02 03:54:38 -0400 (Tue, 02 Aug 2011)
New Revision: 1801
Modified:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
Log:
Fix for JBPAPP-6725
Modified: branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
===================================================================
--- branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/java/org/apache/catalina/authenticator/SingleSignOnEntry.java 2011-08-02 07:50:47 UTC (rev 1800)
+++ branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/java/org/apache/catalina/authenticator/SingleSignOnEntry.java 2011-08-02 07:54:38 UTC (rev 1801)
@@ -184,7 +184,8 @@
this.password = password;
this.canReauthenticate =
(Constants.BASIC_METHOD.equals(authType)
- || Constants.FORM_METHOD.equals(authType));
+ || Constants.FORM_METHOD.equals(authType)
+ || (username != null && password != null));
}
}
13 years, 4 months
JBossWeb SVN: r1800 - branches.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-08-02 03:50:47 -0400 (Tue, 02 Aug 2011)
New Revision: 1800
Added:
branches/JBOSSWEB_2_1_7_GA_JBPAPP-6725/
Log:
13 years, 4 months
JBossWeb SVN: r1799 - branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/java/org/apache/catalina/authenticator.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-08-01 13:02:07 -0400 (Mon, 01 Aug 2011)
New Revision: 1799
Modified:
branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
Log:
Fix for JBPAPP-6724
Modified: branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/java/org/apache/catalina/authenticator/SingleSignOnEntry.java
===================================================================
--- branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/java/org/apache/catalina/authenticator/SingleSignOnEntry.java 2011-08-01 16:59:13 UTC (rev 1798)
+++ branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/java/org/apache/catalina/authenticator/SingleSignOnEntry.java 2011-08-01 17:02:07 UTC (rev 1799)
@@ -184,7 +184,8 @@
this.password = password;
this.canReauthenticate =
(Constants.BASIC_METHOD.equals(authType)
- || Constants.FORM_METHOD.equals(authType));
+ || Constants.FORM_METHOD.equals(authType)
+ || (username != null && password != null));
}
}
13 years, 4 months
JBossWeb SVN: r1798 - branches.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2011-08-01 12:59:13 -0400 (Mon, 01 Aug 2011)
New Revision: 1798
Added:
branches/JBOSSWEB_2_1_8_GA_JBPAPP-6724/
Log:
13 years, 4 months