On 10/06/2014 23:55, Konstantin Kolinko wrote: > 2014-06-11 2:46 GMT+04:00 <ma...@apache.org>: >> Author: markt >> Date: Tue Jun 10 22:46:55 2014 >> New Revision: 1601787 >> >> URL: http://svn.apache.org/r1601787 >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56612 >> Correctly parse two consecutive escaped single quotes when used in UEL >> expression in a JSP. >> Includes various unit tests that check the parsing of ${'\'\''} >> >> Added: >> tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5nnnn/bug56612.jsp >> - copied unchanged from r1601785, >> tomcat/trunk/test/webapp/bug5nnnn/bug56612.jsp >> Modified: >> tomcat/tc7.0.x/trunk/ (props changed) >> tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java >> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELEvaluation.java >> tomcat/tc7.0.x/trunk/test/org/apache/el/TestELInJsp.java >> tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java >> tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml >> >> Propchange: tomcat/tc7.0.x/trunk/ >> ------------------------------------------------------------------------------ >> Merged /tomcat/trunk:r1601785 >> >> Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >> URL: >> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1601787&r1=1601786&r2=1601787&view=diff >> ============================================================================== >> --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java >> (original) >> +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Parser.java Tue Jun >> 10 22:46:55 2014 >> @@ -745,7 +745,7 @@ class Parser implements TagConstants { >> // XXX could move this logic to JspReader >> last = reader.mark(); // XXX somewhat wasteful > > 1. "last" is not advanced in this inner loop, nor it was inside the > old "if". It is likely a bug.
I don't see how. It should be correct at the point it is used. > 2. If think the "if"s below were supposed to be a chain of "elseif"s. Looks like a clean-up that was never back-ported from 8 to 7. If you want to scratch that itch, go ahead. > 3. It needs backport to Tomcat 6. I'll propose the backport shortly. > 4. A System.out.println has sneaked in below. That was me debugging BZ 56518 - fixed. > >> currentChar = reader.nextChar(); >> - if (currentChar == '\\' && (singleQuoted || doubleQuoted)) { >> + while (currentChar == '\\' && (singleQuoted || doubleQuoted)) { >> // skip character following '\' within quotes >> reader.nextChar(); >> currentChar = reader.nextChar(); >> >> Modified: >> tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java >> URL: >> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1601787&r1=1601786&r2=1601787&view=diff >> ============================================================================== >> --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java >> (original) >> +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java Tue >> Jun 10 22:46:55 2014 >> @@ -120,6 +120,7 @@ public class NioChannel implements ByteC >> */ >> @Override >> public int write(ByteBuffer src) throws IOException { >> + System.out.println(Thread.currentThread().isInterrupted()); >> return sc.write(src); >> } > > > (...) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org