tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1502552 - in /tomcat/trunk: java/javax/el/ELProcessor.java test/javax/el/TestELProcessor.java
Date Fri, 12 Jul 2013 23:49:35 GMT
2013/7/12  <markt@apache.org>:
> Author: markt
> Date: Fri Jul 12 13:25:04 2013
> New Revision: 1502552
>
> URL: http://svn.apache.org/r1502552
> Log:
> Add some more unit tests for the EL processor and make sure it uses the import information
it has to hand to resolve class names.
>
> Modified:
>     tomcat/trunk/java/javax/el/ELProcessor.java
>     tomcat/trunk/test/javax/el/TestELProcessor.java
>
> Modified: tomcat/trunk/java/javax/el/ELProcessor.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELProcessor.java?rev=1502552&r1=1502551&r2=1502552&view=diff
> ==============================================================================
> --- tomcat/trunk/java/javax/el/ELProcessor.java (original)
> +++ tomcat/trunk/java/javax/el/ELProcessor.java Fri Jul 12 13:25:04 2013
> @@ -74,7 +74,12 @@ public class ELProcessor {
>                      context, "elProcessor.defineFunctionNullParams"));
>          }
>
> -        Class<?> clazz = Class.forName(className);
> +        // Check the imports
> +        Class<?> clazz = context.getImportHandler().resolveClass(className);
> +
> +        if (clazz == null) {
> +            clazz = Class.forName(className);
> +        }

Is it supposed to be able to load classes that belong to a web application?
If so, then you need TCCL here.

Class.forName(className) will only load classes from Common
classloader (where javax.el.ELProcessor is loaded from).

Best regards,
Konstantin Kolinko

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


Mime
View raw message