Author: markt
Date: Sat Oct 27 19:49:38 2012
New Revision: 1402857
URL: http://svn.apache.org/viewvc?rev=1402857&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53896
Use an optimised CompositeELResolver for Jasper that skips resolvers that are
known to be unable to resolve the value.
Patch by Jarek Gawor.
Added:
tomcat/tc7.0.x/trunk/java/org/apache/jasper/el/JasperELResolver.java
- copied unchanged from r1402855,
tomcat/trunk/java/org/apache/jasper/el/JasperELResolver.java
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1402855
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java?rev=1402857&r1=1402856&r2=1402857&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
Sat Oct 27 19:49:38 2012
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,31 +19,24 @@ package org.apache.jasper.runtime;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import javax.el.ArrayELResolver;
-import javax.el.BeanELResolver;
import javax.el.CompositeELResolver;
import javax.el.ELContextEvent;
import javax.el.ELContextListener;
import javax.el.ELResolver;
import javax.el.ExpressionFactory;
-import javax.el.ListELResolver;
-import javax.el.MapELResolver;
-import javax.el.ResourceBundleELResolver;
import javax.servlet.ServletContext;
import javax.servlet.jsp.JspApplicationContext;
import javax.servlet.jsp.JspContext;
-import javax.servlet.jsp.el.ImplicitObjectELResolver;
-import javax.servlet.jsp.el.ScopedAttributeELResolver;
import org.apache.jasper.Constants;
import org.apache.jasper.el.ELContextImpl;
+import org.apache.jasper.el.JasperELResolver;
/**
* Implementation of JspApplicationContext
- *
+ *
* @author Jacob Hookom
*/
public class JspApplicationContextImpl implements JspApplicationContext {
@@ -119,18 +112,7 @@ public class JspApplicationContextImpl i
private ELResolver createELResolver() {
this.instantiated = true;
if (this.resolver == null) {
- CompositeELResolver r = new CompositeELResolver();
- r.add(new ImplicitObjectELResolver());
- for (Iterator<ELResolver> itr = this.resolvers.iterator();
- itr.hasNext();) {
- r.add(itr.next());
- }
- r.add(new MapELResolver());
- r.add(new ResourceBundleELResolver());
- r.add(new ListELResolver());
- r.add(new ArrayELResolver());
- r.add(new BeanELResolver());
- r.add(new ScopedAttributeELResolver());
+ CompositeELResolver r = new JasperELResolver(this.resolvers);
this.resolver = r;
}
return this.resolver;
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1402857&r1=1402856&r2=1402857&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Oct 27 19:49:38 2012
@@ -98,6 +98,11 @@
</subsection>
<subsection name="Jasper">
<changelog>
+ <scode>
+ <bug>53896</bug>: Use an optimised CompositeELResolver for Jasper that
+ skips resolvers that are known to be unable to resolve the value. Patch
+ by Jarek Gawor. (markt)
+ </scode>
<fix>
<bug>53986</bug>: Correct a regression introduced by the fix for
<bug>53713</bug>. JSP comments that ended with the sequence ---%>
(or
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]