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/02/26 18:44:06 UTC

[tomcat] 02/02: Remove deprecated code.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 51f96d1c44f90ab3e71a10168b09866d61c21315
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Feb 26 17:45:22 2020 +0000

    Remove deprecated code.
---
 java/org/apache/catalina/loader/WebappLoader.java | 41 ++---------------------
 1 file changed, 2 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java b/java/org/apache/catalina/loader/WebappLoader.java
index d681baa..75bb589 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -66,34 +66,6 @@ public class WebappLoader extends LifecycleMBeanBase
 
     private static final Log log = LogFactory.getLog(WebappLoader.class);
 
-    // ----------------------------------------------------------- Constructors
-
-    /**
-     * Construct a new WebappLoader. The parent class loader will be defined by
-     * {@link Context#getParentClassLoader()}.
-     */
-    public WebappLoader() {
-        this(null);
-    }
-
-
-    /**
-     * Construct a new WebappLoader with the specified class loader
-     * to be defined as the parent of the ClassLoader we ultimately create.
-     *
-     * @param parent The parent class loader
-     *
-     * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
-     *             specify the required class loader. This method will be
-     *             removed in Tomcat 10 onwards.
-     */
-    @Deprecated
-    public WebappLoader(ClassLoader parent) {
-        super();
-        this.parentClassLoader = parent;
-    }
-
-
     // ----------------------------------------------------- Instance Variables
 
     /**
@@ -124,12 +96,6 @@ public class WebappLoader extends LifecycleMBeanBase
 
 
     /**
-     * The parent class loader of the class loader we will create.
-     */
-    private ClassLoader parentClassLoader = null;
-
-
-    /**
      * The reloadable flag for this Loader.
      */
     private boolean reloadable = false;
@@ -510,11 +476,8 @@ public class WebappLoader extends LifecycleMBeanBase
         Class<?> clazz = Class.forName(loaderClass);
         WebappClassLoaderBase classLoader = null;
 
-        if (parentClassLoader == null) {
-            parentClassLoader = context.getParentClassLoader();
-        } else {
-            context.setParentClassLoader(parentClassLoader);
-        }
+        ClassLoader parentClassLoader = context.getParentClassLoader();
+
         Class<?>[] argTypes = { ClassLoader.class };
         Object[] args = { parentClassLoader };
         Constructor<?> constr = clazz.getConstructor(argTypes);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org