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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8175831  Better error messages for SMAP generation
8175831 is described below

commit 817583187593dec89b47d5e2df83226d3943a52f
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Jun 10 14:33:06 2019 +0100

    Better error messages for SMAP generation
---
 java/org/apache/jasper/compiler/SmapUtil.java            | 6 ++++--
 java/org/apache/jasper/resources/LocalStrings.properties | 4 ++--
 webapps/docs/changelog.xml                               | 8 ++++++++
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/jasper/compiler/SmapUtil.java 
b/java/org/apache/jasper/compiler/SmapUtil.java
index 13506cb..6695e15 100644
--- a/java/org/apache/jasper/compiler/SmapUtil.java
+++ b/java/org/apache/jasper/compiler/SmapUtil.java
@@ -177,10 +177,12 @@ public class SmapUtil {
             SDEInstaller installer = new SDEInstaller(classFile, smap);
             installer.install(tmpFile);
             if (!classFile.delete()) {
-                throw new 
IOException(Localizer.getMessage("jsp.error.unable.deleteClassFile"));
+                throw new 
IOException(Localizer.getMessage("jsp.error.unable.deleteClassFile",
+                        classFile.getAbsolutePath()));
             }
             if (!tmpFile.renameTo(classFile)) {
-                throw new 
IOException(Localizer.getMessage("jsp.error.unable.renameClassFile"));
+                throw new 
IOException(Localizer.getMessage("jsp.error.unable.renameClassFile",
+                        tmpFile.getAbsolutePath(), 
classFile.getAbsolutePath()));
             }
         }
 
diff --git a/java/org/apache/jasper/resources/LocalStrings.properties 
b/java/org/apache/jasper/resources/LocalStrings.properties
index c90af28..8a43718 100644
--- a/java/org/apache/jasper/resources/LocalStrings.properties
+++ b/java/org/apache/jasper/resources/LocalStrings.properties
@@ -235,10 +235,10 @@ jsp.error.tld.url=Bad TLD URL [{0}]
 jsp.error.tlv.invalid.page=Validation error messages from TagLibraryValidator 
for [{0}] in [{1}]
 jsp.error.tlvclass.instantiation=Failed to load or instantiate 
TagLibraryValidator class: [{0}]
 jsp.error.unable.compile=Unable to compile class for JSP
-jsp.error.unable.deleteClassFile=Unable to delete class file
+jsp.error.unable.deleteClassFile=Unable to delete class file [{0}]
 jsp.error.unable.getType=Unable to extract type from [{0}]
 jsp.error.unable.load=Unable to load class for JSP
-jsp.error.unable.renameClassFile=Unable to rename class file
+jsp.error.unable.renameClassFile=Unable to rename class file from [{0}] to 
[{1}]
 jsp.error.unable.to_find_method=Unable to find setter method for attribute: 
[{0}]
 jsp.error.unavailable=JSP has been marked unavailable
 jsp.error.unbalanced.endtag=The end tag "&lt;/{0}" is unbalanced
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4dacf65..7027b16 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -54,6 +54,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <add>
+        Include file names if SMAP processor is unable to delete or rename a
+        class file during SMAP generation. (markt)
+      </add>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 9.0.21 (markt)" rtext="2018-06-07">
   <subsection name="Catalina">


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

Reply via email to