This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push: new c86cca2 Fix broken Javadoc c86cca2 is described below commit c86cca2d31f827a335bb1414af17bb68737c3043 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Mar 15 23:16:57 2019 +0000 Fix broken Javadoc --- .../apache/catalina/connector/MapperListener.java | 2 +- .../core/JreMemoryLeakPreventionListener.java | 2 +- java/org/apache/catalina/core/StandardContext.java | 10 +++--- .../catalina/filters/CsrfPreventionFilter.java | 1 - .../apache/catalina/servlets/WebdavServlet.java | 3 +- java/org/apache/jasper/compiler/ELParser.java | 21 ++++++----- java/org/apache/jasper/compiler/JspReader.java | 42 +++++++++++----------- .../apache/jasper/compiler/ParserController.java | 37 +++++++++---------- 8 files changed, 56 insertions(+), 62 deletions(-) diff --git a/java/org/apache/catalina/connector/MapperListener.java b/java/org/apache/catalina/connector/MapperListener.java index 2bf89de..5b0e9f9 100644 --- a/java/org/apache/catalina/connector/MapperListener.java +++ b/java/org/apache/catalina/connector/MapperListener.java @@ -459,7 +459,7 @@ public class MapperListener extends LifecycleMBeanBase * * @param context * @param wrapper - * @param list + * @param wrappers */ private void prepareWrapperMappingInfo(Context context, Wrapper wrapper, List<WrapperMappingInfo> wrappers) { diff --git a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java index 2d2b75b..62b2278 100644 --- a/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java +++ b/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java @@ -165,7 +165,7 @@ public class JreMemoryLeakPreventionListener implements LifecycleListener { /** * Protect against resources being read for JAR files and, as a side-effect, * the JAR file becoming locked. Note this disables caching for all - * {@link URLConnection}s, regardless of type. Defaults to + * {@link java.net.URLConnection}s, regardless of type. Defaults to * <code>true</code>. */ private boolean urlCacheProtection = true; diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index d158e76..85a6147 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -867,10 +867,12 @@ public class StandardContext extends ContainerBase /** * If an HttpClient keep-alive timer thread has been started by this web * application and is still running, should Tomcat change the context class - * loader from the current {@link WebappClassLoaderBase} to - * {@link WebappClassLoaderBase#parent} to prevent a memory leak? Note that - * the keep-alive timer thread will stop on its own once the keep-alives all - * expire however, on a busy system that might not happen for some time. + * loader from the current + * {@link org.apache.catalina.loader.WebappClassLoaderBase} to + * {@link org.apache.catalina.loader.WebappClassLoaderBase#parent} to + * prevent a memory leak? Note that the keep-alive timer thread will stop on + * its own once the keep-alives all expire however, on a busy system that + * might not happen for some time. */ private boolean clearReferencesHttpClientKeepAliveThread = true; diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java b/java/org/apache/catalina/filters/CsrfPreventionFilter.java index c688213..c518535 100644 --- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java +++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java @@ -173,7 +173,6 @@ public class CsrfPreventionFilter extends CsrfPreventionFilterBase { * Return the specified URL with the nonce added to the query string. * * @param url URL to be modified - * @param nonce The nonce to add */ private String addNonce(String url) { diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 3d95a8e..0a5df26 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -2081,7 +2081,6 @@ public class WebdavServlet extends DefaultServlet { * Propfind helper method. * * @param req The servlet request - * @param resources Resources object associated with this context * @param generatedXML XML response to the Propfind request * @param path Path of the current resource * @param type Propfind type @@ -2365,7 +2364,7 @@ public class WebdavServlet extends DefaultServlet { /** * Propfind helper method. Displays the properties of a lock-null resource. * - * @param resources Resources object associated with this context + * @param req The servlet request * @param generatedXML XML response to the Propfind request * @param path Path of the current resource * @param type Propfind type diff --git a/java/org/apache/jasper/compiler/ELParser.java b/java/org/apache/jasper/compiler/ELParser.java index 5145656..590eaa9 100644 --- a/java/org/apache/jasper/compiler/ELParser.java +++ b/java/org/apache/jasper/compiler/ELParser.java @@ -5,9 +5,9 @@ * 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. @@ -25,12 +25,12 @@ import org.apache.jasper.compiler.ELNode.Text; /** * This class implements a parser for EL expressions. - * + * * It takes strings of the form xxx${..}yyy${..}zzz etc, and turn it into a * ELNode.Nodes. - * + * * Currently, it only handles text outside ${..} and functions in ${ ..}. - * + * * @author Kin-man Chung */ @@ -47,7 +47,7 @@ public class ELParser { private int index; // Current index of the expression private final String expression; // The EL expression - + private char type; private final boolean isDeferredSyntaxAllowedAsLiteral; @@ -65,7 +65,7 @@ public class ELParser { /** * Parse an EL expression - * + * * @param expression * The input expression string of the form Char* ('${' Char* * '}')* Char* @@ -93,9 +93,9 @@ public class ELParser { /** * Parse an EL expression string '${...}'. Currently only separates the EL * into functions and everything else. - * + * * @return An ELNode.Nodes representing the EL expression - * + * * Note: This can not be refactored to use the standard EL implementation as * the EL API does not provide the level of access required to the * parsed expression. @@ -197,7 +197,7 @@ public class ELParser { /** * Skip until an EL expression ('${' || '#{') is reached, allowing escape * sequences '\${' and '\#{'. - * + * * @return The text string up to the EL expression */ private String skipUntilEL() { @@ -268,7 +268,6 @@ public class ELParser { * {@link #skipUntilEL()}. * * @param input Non-EL input to be escaped - * @param isDeferredSyntaxAllowedAsLiteral * * @return The escaped version of the input */ diff --git a/java/org/apache/jasper/compiler/JspReader.java b/java/org/apache/jasper/compiler/JspReader.java index 9faa848..9cea3ca 100644 --- a/java/org/apache/jasper/compiler/JspReader.java +++ b/java/org/apache/jasper/compiler/JspReader.java @@ -5,9 +5,9 @@ * 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. @@ -141,13 +141,13 @@ class JspReader { } /** - * @return JSP compilation context with which this JspReader is + * @return JSP compilation context with which this JspReader is * associated */ JspCompilationContext getJspCompilationContext() { return context; } - + /** * Returns the file at the given position in the list. * @@ -157,16 +157,16 @@ class JspReader { String getFile(final int fileid) { return sourceFiles.get(fileid); } - + /** * Checks if the current file has more input. * * @return True if more reading is possible * @throws JasperException if an error occurs - */ + */ boolean hasMoreInput() throws JasperException { if (current.cursor >= current.stream.length) { - if (singleFile) return false; + if (singleFile) return false; while (popFile()) { if (current.cursor < current.stream.length) return true; } @@ -174,15 +174,15 @@ class JspReader { } return true; } - + int nextChar() throws JasperException { if (!hasMoreInput()) return -1; - + int ch = current.stream[current.cursor]; current.cursor++; - + if (ch == '\n') { current.line++; current.col = 0; @@ -428,7 +428,7 @@ class JspReader { * Skip until the given string is matched in the stream. * When returned, the context is positioned past the end of the match. * - * @param s The String to match. + * @param limit The String to match. * @return A non-null <code>Mark</code> instance (positioned immediately * before the search string) if found, <strong>null</strong> * otherwise. @@ -467,7 +467,7 @@ class JspReader { * chars initially escaped by a '\' and any EL expressions. * When returned, the context is positioned past the end of the match. * - * @param s The String to match. + * @param limit The String to match. * @param ignoreEL <code>true</code> if something that looks like EL should * not be treated as EL. * @return A non-null <code>Mark</code> instance (positioned immediately @@ -502,7 +502,7 @@ class JspReader { } return null; } - + /** * Skip until the given end tag is matched in the stream. * When returned, the context is positioned past the end of the tag. @@ -577,22 +577,22 @@ class JspReader { StringBuilder StringBuilder = new StringBuilder(); skipSpaces(); StringBuilder.setLength(0); - + if (!hasMoreInput()) { return ""; } int ch = peekChar(); - + if (quoted) { if (ch == '"' || ch == '\'') { char endQuote = ch == '"' ? '"' : '\''; - // Consume the open quote: + // Consume the open quote: ch = nextChar(); for (ch = nextChar(); ch != -1 && ch != endQuote; ch = nextChar()) { - if (ch == '\\') + if (ch == '\\') ch = nextChar(); StringBuilder.append((char) ch); } @@ -642,7 +642,7 @@ class JspReader { || ch == '/') { return true; } - // Look for an end-of-comment or end-of-tag: + // Look for an end-of-comment or end-of-tag: if (ch == '-') { Mark mark = mark(); if (((ch = nextChar()) == '>') @@ -678,7 +678,7 @@ class JspReader { return sourceFiles.size() - 1; } - + /** * Unregister the source file. @@ -702,7 +702,7 @@ class JspReader { * Push a file (and its associated Stream) on the file stack. THe * current position in the current file is remembered. */ - private void pushFile(String file, String encoding, + private void pushFile(String file, String encoding, InputStreamReader reader) throws JasperException { // Register the file @@ -734,7 +734,7 @@ class JspReader { caw.write(buf, 0, i); caw.close(); if (current == null) { - current = new Mark(this, caw.toCharArray(), fileid, + current = new Mark(this, caw.toCharArray(), fileid, getFile(fileid), master, encoding); } else { current.pushStream(caw.toCharArray(), fileid, getFile(fileid), diff --git a/java/org/apache/jasper/compiler/ParserController.java b/java/org/apache/jasper/compiler/ParserController.java index 7a7a917..698081b 100644 --- a/java/org/apache/jasper/compiler/ParserController.java +++ b/java/org/apache/jasper/compiler/ParserController.java @@ -5,9 +5,9 @@ * 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. @@ -73,7 +73,7 @@ class ParserController implements TagConstants { * Constructor */ public ParserController(JspCompilationContext ctxt, Compiler compiler) { - this.ctxt = ctxt; + this.ctxt = ctxt; this.compiler = compiler; this.err = compiler.getErrorDispatcher(); } @@ -94,7 +94,7 @@ class ParserController implements TagConstants { public Node.Nodes parse(String inFileName) throws FileNotFoundException, JasperException, IOException { // If we're parsing a packaged tag file or a resource included by it - // (using an include directive), ctxt.getTagFileJar() returns the + // (using an include directive), ctxt.getTagFileJar() returns the // JAR file from which to read the tag file or included resource, // respectively. isTagFile = ctxt.isTagFile(); @@ -111,7 +111,7 @@ class ParserController implements TagConstants { public Node.Nodes parseDirectives(String inFileName) throws FileNotFoundException, JasperException, IOException { // If we're parsing a packaged tag file or a resource included by it - // (using an include directive), ctxt.getTagFileJar() returns the + // (using an include directive), ctxt.getTagFileJar() returns the // JAR file from which to read the tag file or included resource, // respectively. isTagFile = ctxt.isTagFile(); @@ -139,7 +139,7 @@ class ParserController implements TagConstants { /** * Extracts tag file directive information from the given tag file. * - * This is invoked by the compiler + * This is invoked by the compiler * * @param inFileName The name of the tag file to be parsed. * @param jarResource The location of the tag file. @@ -163,11 +163,6 @@ class ParserController implements TagConstants { * @param inFileName The name of the JSP page or tag file to be parsed. * @param parent The parent node (non-null when processing an include * directive) - * @param isTagFile true if file to be parsed is tag file, and false if it - * is a regular JSP page - * @param directivesOnly true if the file to be parsed is a tag file and - * we are only interested in the directives needed for constructing a - * TagFileInfo. * @param jarResource The JAR file from which to read the JSP page or tag file, * or null if the JSP page or tag file is to be read from the filesystem */ @@ -199,7 +194,7 @@ class ParserController implements TagConstants { compiler.getPageInfo().addDependant( jarResource.getEntry(entry).toString(), Long.valueOf(jarFile.getEntry(entry).getTime())); - + } } @@ -273,7 +268,7 @@ class ParserController implements TagConstants { * * @param absFileName The URI to match * - * @return The value of the <page-encoding> attribute of the + * @return The value of the <page-encoding> attribute of the * jsp-property-group with matching URL pattern */ private String getJspConfigPageEncoding(String absFileName) @@ -354,7 +349,7 @@ class ParserController implements TagConstants { * We need to be careful, because the page may be encoded in * ISO-8859-1 (or something entirely different), and may * contain byte sequences that will cause a UTF-8 converter to - * throw exceptions. + * throw exceptions. * * It is safe to use a source encoding of ISO-8859-1 in this * case, as there are no invalid byte sequences in ISO-8859-1, @@ -376,11 +371,11 @@ class ParserController implements TagConstants { /* * At this point, 'isExternal' or 'isXml' is FALSE. - * Search for jsp:root action, in order to determine if we're dealing - * with XML or standard syntax (unless we already know what we're + * Search for jsp:root action, in order to determine if we're dealing + * with XML or standard syntax (unless we already know what we're * dealing with, i.e., when 'isExternal' is TRUE and 'isXml' is FALSE). * No check for XML prolog, since nothing prevents a page from - * outputting XML and still using JSP syntax (in this case, the + * outputting XML and still using JSP syntax (in this case, the * XML prolog is treated as template text). */ JspReader jspReader = null; @@ -425,7 +420,7 @@ class ParserController implements TagConstants { } } } - + } /* @@ -538,9 +533,9 @@ class ParserController implements TagConstants { private String resolveFileName(String inFileName) { String fileName = inFileName.replace('\\', '/'); boolean isAbsolute = fileName.startsWith("/"); - fileName = isAbsolute ? fileName + fileName = isAbsolute ? fileName : baseDirStack.peek() + fileName; - String baseDir = + String baseDir = fileName.substring(0, fileName.lastIndexOf('/') + 1); baseDirStack.push(baseDir); return fileName; @@ -601,7 +596,7 @@ class ParserController implements TagConstants { && Character.isWhitespace(root.charAt(index))) { index++; } - if (index < root.length() + if (index < root.length() && (root.charAt(index) == '"' || root.charAt(index) == '\'')) { index++; if (root.regionMatches(index, JSP_URI, 0, JSP_URI.length())) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org