Skip to content
This repository was archived by the owner on Aug 17, 2018. It is now read-only.

Commit c042ad7

Browse files
author
Kin Man Chung
committed
svn path=/trunk/; revision=1460
1 parent b0fe733 commit c042ad7

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

api/src/main/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,19 @@ public Object getValue(ELContext context,
129129
// To support reference of static fields for imported class in
130130
// EL 3.0, if a scoped attribute returns null, this attribute
131131
// is further checked to see if it is the name of an imported
132-
// class. If so, the value of the imported field is return.
133-
// Note: the JSP spec needs to be updated for this behavior. It is
134-
// not backward compatible and a runtime switch may be needed to
135-
// force backward compatility.
132+
// class. If so, an ELClass instance is returned.
133+
// Note: the JSP spec needs to be updated for this behavior. Note
134+
// also that this behavior is not backward compatible with JSP 2.2
135+
// and a runtime switch may be needed to force backward
136+
// compatility.
136137
if (value == null) {
137138
// check to see if the property is an imported class
138139
if (context.getImportHandler() != null) {
139140
Class<?> c = context.getImportHandler().resolveClass(attribute);
140141
if (c != null) {
141-
value = context.getELResolver().getValue(
142-
context, new ELClass(c), attribute);
142+
value = new ELClass(c);
143+
// A possible optimization is to set the ELClass
144+
// instance in an attribute map.
143145
}
144146
}
145147
}

0 commit comments

Comments
 (0)