This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 85e93fbf55e22dcfb6bbc54b9413051ccbabe5c0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Apr 28 16:00:03 2020 +0100

    Fix compilation of JSPs with inner classes with ECJ 4.14 onwards
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 2 +-
 webapps/docs/changelog.xml                       | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 53ef2c4..bf64637 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -212,7 +212,7 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                 }
 
                 private boolean isPackage(String result) {
-                    if (result.equals(targetClassName)) {
+                    if (result.equals(targetClassName) || 
result.startsWith(targetClassName + '$')) {
                         return false;
                     }
                     String resourceName = result.replace('.', '/') + ".class";
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4d3dbf1..1629207 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -121,6 +121,11 @@
         is unpacked in <code>/WEB-INF/classes</code> ensure that the tag file
         can still be found. Patch provided by Karl von Randow. (markt)
       </fix>
+      <fix>
+        Ensure that the Jasper code that interfaces with the Eclipse Compiler
+        for Java (ECJ) enables Jasper to compile JSPs using ECJ 4.14 onwards
+        when the JSPs have inner classes. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">


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

Reply via email to