You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/12/07 17:47:56 UTC
[tomcat] branch 9.0.x updated: Align with 10.0.x and 8.5.x
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 46ed1da Align with 10.0.x and 8.5.x
46ed1da is described below
commit 46ed1da52e72bd6d79591128a84a63cf40be49b0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Dec 7 17:47:41 2020 +0000
Align with 10.0.x and 8.5.x
---
java/org/apache/catalina/filters/CsrfPreventionFilter.java | 2 ++
.../org/apache/catalina/filters/RestCsrfPreventionFilter.java | 3 +--
java/org/apache/catalina/loader/WebappClassLoaderBase.java | 11 +++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 621cd6d..fe7a27f 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -248,6 +248,8 @@ public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
/*
* Return the specified URL with the nonce added to the query string.
+ *
+ * @param url URL to be modified
*/
private String addNonce(String url) {
diff --git a/java/org/apache/catalina/filters/RestCsrfPreventionFilter.java b/java/org/apache/catalina/filters/RestCsrfPreventionFilter.java
index a33b68e..78769ce 100644
--- a/java/org/apache/catalina/filters/RestCsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/RestCsrfPreventionFilter.java
@@ -104,8 +104,7 @@ public class RestCsrfPreventionFilter extends CsrfPreventionFilterBase {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
- if (request instanceof HttpServletRequest &&
- response instanceof HttpServletResponse) {
+ if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
MethodType mType = MethodType.MODIFYING_METHOD;
if (nonModifyingMethods.test(((HttpServletRequest) request).getMethod())) {
mType = MethodType.NON_MODIFYING_METHOD;
diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index 340f214..3987d89 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -194,8 +194,7 @@ public abstract class WebappClassLoaderBase extends URLClassLoader
/**
* The string manager for this package.
*/
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
+ protected static final StringManager sm = StringManager.getManager(WebappClassLoaderBase.class);
// ----------------------------------------------------------- Constructors
@@ -361,10 +360,10 @@ public abstract class WebappClassLoaderBase extends URLClassLoader
/**
* Should Tomcat call
- * {@link org.apache.juli.logging.LogFactory#release(ClassLoader)}
- * when the class loader is stopped? If not specified, the default value
- * of <code>true</code> is used. Changing the default setting is likely to
- * lead to memory leaks and other issues.
+ * {@link org.apache.juli.logging.LogFactory#release(ClassLoader)} when the
+ * class loader is stopped? If not specified, the default value of
+ * <code>true</code> is used. Changing the default setting is likely to lead
+ * to memory leaks and other issues.
*/
private boolean clearReferencesLogFactoryRelease = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org