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

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

commit 5bc5ed209554846c522071da56fe6276053da85b
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 a6638f1..a561cbe 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -239,7 +239,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 a8a5930..5853387 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,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