freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [2/2] incubator-freemarker git commit: Forward ported FREEMARKER-88 (code clarity only; it doesn't cause problem in FM3)
Date Sun, 04 Feb 2018 01:41:34 GMT
Forward ported FREEMARKER-88 (code clarity only; it doesn't cause problem in FM3)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/be2d4fcc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/be2d4fcc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/be2d4fcc

Branch: refs/heads/3
Commit: be2d4fcc48361fdb677c0765ad8eee90ba952e3a
Parents: a937af0
Author: ddekany <ddekany@apache.org>
Authored: Sun Feb 4 02:40:47 2018 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sun Feb 4 02:41:26 2018 +0100

----------------------------------------------------------------------
 .../org/apache/freemarker/servlet/jsp/JspTagModelBase.java    | 2 +-
 .../freemarker/servlet/jsp/SimpleTagDirectiveModel.java       | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/be2d4fcc/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/JspTagModelBase.java
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/JspTagModelBase.java
b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/JspTagModelBase.java
index 3e01c54..7205702 100644
--- a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/JspTagModelBase.java
+++ b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/JspTagModelBase.java
@@ -138,7 +138,7 @@ abstract class JspTagModelBase implements TemplateModelWithOriginName
{
             throw (TemplateException) e;
         }
         if (e instanceof TemplateExceptionWrapperJspException) {
-            return (TemplateException) e.getCause();
+            return ((TemplateExceptionWrapperJspException) e).getCause();
         }
         return new TemplateException(e,
                 "Error while invoking the ", new _DelayedJQuote(tagName), " JSP custom tag;
see cause exception");

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/be2d4fcc/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/SimpleTagDirectiveModel.java
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/SimpleTagDirectiveModel.java
b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/SimpleTagDirectiveModel.java
index 28155d7..619b8c6 100644
--- a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/SimpleTagDirectiveModel.java
+++ b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/SimpleTagDirectiveModel.java
@@ -118,10 +118,15 @@ class SimpleTagDirectiveModel extends JspTagModelBase implements TemplateDirecti
 
     static final class TemplateExceptionWrapperJspException extends JspException {
 
-        public TemplateExceptionWrapperJspException(Throwable cause) {
+        public TemplateExceptionWrapperJspException(TemplateException cause) {
             super("Nested content has thrown template exception", cause);
         }
         
+        @Override
+        public TemplateException getCause() {
+            return (TemplateException) super.getCause();
+        }
+        
     }
     
 }


Mime
View raw message