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

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

commit 94cbea7df91d6418e879397ef98e46b7454ec758
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 70333ba..9bc5e1c 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -263,7 +263,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 a06c14b..2f548be 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -145,6 +145,11 @@
         Add more descriptive error message in DefaultServlet for SC_NOT_FOUND.
         (michaelo)
       </add>
+      <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="Cluster">


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

Reply via email to