[
https://issues.jboss.org/browse/WFLY-4023?page=com.atlassian.jira.plugin....
]
jaikiran pai commented on WFLY-4023:
------------------------------------
Apparently the spec states that the class has to be loadable by the "current
classloader"
https://developer.jboss.org/message/908146#908146:
{quote}
EL 3.0 spec
1.22.2 Imports of Packages, Classes, and Static Fields
Either a class or a package can be explicitly imported into the EL evaluation environment.
Importing a package imports all the classes in the package. The classes that can be
imported are restricted to the classes that can be loaded by the *current class loader*.
{quote}
I haven't read that spec nor have much background on this, so I don't know if
current classloader really means context classloader of the current thread.
javax.el.ImportHandler#importClass & #importPackage doesn't
import WEB-INF/classes
----------------------------------------------------------------------------------
Key: WFLY-4023
URL:
https://issues.jboss.org/browse/WFLY-4023
Project: WildFly
Issue Type: Bug
Components: JSF
Affects Versions: 8.1.0.Final
Environment: Win7, Wildfly 8.1.0.Final
Reporter: Patrick Garner
Assignee: Farah Juma
Original Estimate: 4 hours
Remaining Estimate: 4 hours
ImportHandler is not importing classes in WEB-INF/classes and, thus, developers are
unable to import classes into the EL evaluation environment per EL 3.0 spec. section
1.22.2 "Imports of Packages, Classes, and Static Fields"
Here's the ImportHandler relevant code
(
https://github.com/jboss/jboss-el-api_spec/blob/master/src/main/java/java...)
{code:java}
private Class<?> getClassFor(String className) {
if (!notAClass.contains(className)) {
try {
return Class.forName(className, false, getClass().getClassLoader());
} catch (ClassNotFoundException ex) {
notAClass.add(className);
}
}
return null;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)