Author: markt Date: Mon Oct 27 22:03:22 2014 New Revision: 1634697 URL: http://svn.apache.org/r1634697 Log: JspReader.singleFile is always true. The nested files it supports have not been used since Tomcat 3.x.
Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java tomcat/trunk/java/org/apache/jasper/compiler/Parser.java tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java?rev=1634697&r1=1634696&r2=1634697&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/JspReader.java Mon Oct 27 22:03:22 2014 @@ -84,13 +84,6 @@ class JspReader { private final ErrorDispatcher err; /** - * Set to true when using the JspReader on a single file where we read up - * to the end and reset to the beginning many times. - * (as in ParserController.figureOutJspDocument()). - */ - private boolean singleFile; - - /** * Constructor. * * @param ctxt The compilation context @@ -127,7 +120,6 @@ class JspReader { this.err = err; sourceFiles = new Vector<>(); currFileId = 0; - singleFile = false; pushFile(fname, reader); } @@ -157,10 +149,6 @@ class JspReader { */ boolean hasMoreInput() throws JasperException { if (current.cursor >= current.stream.length) { - if (singleFile) return false; - while (popFile()) { - if (current.cursor < current.stream.length) return true; - } return false; } return true; @@ -195,7 +183,7 @@ class JspReader { int ch = current.stream[current.cursor]; - mark.init(current, singleFile); + mark.init(current, true); current.cursor++; @@ -415,7 +403,7 @@ class JspReader { while((result = indexOf(firstChar, ret)) != null) { if (result.booleanValue()) { if (restart != null) { - restart.init(current, singleFile); + restart.init(current, true); } else { restart = mark(); } @@ -423,7 +411,7 @@ class JspReader { if (peekChar() == limit.charAt(i)) { nextChar(); } else { - current.init(restart, singleFile); + current.init(restart, true); continue skip; } } @@ -597,10 +585,6 @@ class JspReader { return StringBuilder.toString(); } - void setSingleFile(boolean val) { - singleFile = val; - } - /** * Parse utils - Is current character a token delimiter ? Modified: tomcat/trunk/java/org/apache/jasper/compiler/Parser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Parser.java?rev=1634697&r1=1634696&r2=1634697&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/Parser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Parser.java Mon Oct 27 22:03:22 2014 @@ -1786,7 +1786,6 @@ class Parser implements TagConstants { } private void parseFileDirectives(Node parent) throws JasperException { - reader.setSingleFile(true); reader.skipUntil("<"); while (reader.hasMoreInput()) { start = reader.mark(); Modified: tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java?rev=1634697&r1=1634696&r2=1634697&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ParserController.java Mon Oct 27 22:03:22 2014 @@ -356,7 +356,6 @@ class ParserController implements TagCon } catch (FileNotFoundException ex) { throw new JasperException(ex); } - jspReader.setSingleFile(true); Mark startMark = jspReader.mark(); if (!isExternal) { jspReader.reset(startMark); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org