tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: svn commit: r1361432 - /tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
Date Mon, 16 Jul 2012 10:52:19 GMT
On 14.07.2012 00:42, markt@apache.org wrote:
> Author: markt
> Date: Fri Jul 13 22:42:42 2012
> New Revision: 1361432
>
> URL: http://svn.apache.org/viewvc?rev=1361432&view=rev
> Log:
> Remove unused code
>
> Modified:
>      tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1361432&r1=1361431&r2=1361432&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Fri Jul 13 22:42:42
2012
> @@ -236,33 +236,8 @@ public class WebappClassLoader
>       }
>
>
> -    /**
> -     * Construct a new ClassLoader with no defined repositories and the given
> -     * parent ClassLoader.
> -     *
> -     * @param parent Our parent class loader
> -     *
> -     * @deprecated  Unused - will be removed in 8.0.x
> -     */
> -    @Deprecated
> -    public WebappClassLoader(ClassLoader parent) {
> -
> -        super(new URL[0], parent);
> -
> -        this.parent = getParent();
> -
> -        system = getSystemClassLoader();
> -        securityManager = System.getSecurityManager();
> -
> -        if (securityManager != null) {
> -            refreshPolicy();
> -        }
> -    }

I get lots of test failures. This one seems to be used via reflection in 
WebappLoader:

  670     /**
  671      * Create associated classLoader.
  672      */
  673     private WebappClassLoader createClassLoader()
  674         throws Exception {
  675
  676         Class<?> clazz = Class.forName(loaderClass);
  677         WebappClassLoader classLoader = null;
  678
  679         if (parentClassLoader == null) {
  680             parentClassLoader = context.getParentClassLoader();
  681         }
  682         Class<?>[] argTypes = { ClassLoader.class };
  683         Object[] args = { parentClassLoader };
  684         Constructor<?> constr = clazz.getConstructor(argTypes);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  685         classLoader = (WebappClassLoader) constr.newInstance(args);
  686
  687         return classLoader;
  688
  689     }

So we get:

     [junit] java.lang.NoSuchMethodException: 
org.apache.catalina.loader.WebappClassLoader.<init>(java.lang.ClassLoader)
     [junit]     at java.lang.Class.getConstructor0(Class.java:2721)
     [junit]     at java.lang.Class.getConstructor(Class.java:1674)
     [junit]     at 
org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:684)
     [junit]     at 
org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:557)


Regards,

Rainer

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


Mime
View raw message