freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: Forward ported from 2.3: Bug fixed: For JSP Tag based custom tags, if an exception has occurred in the body (nested content), an IndexOutOfBoundsException might have occurred, replacing the original exception.
Date Sun, 04 Feb 2018 12:07:54 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 be2d4fcc4 -> bc9edc0e9


Forward ported from 2.3: Bug fixed: For JSP Tag based custom tags, if an exception has occurred
in the body (nested content), an IndexOutOfBoundsException might have occurred, replacing
the original exception.


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

Branch: refs/heads/3
Commit: bc9edc0e98caf59112ee07bc0d72b6676267fdc4
Parents: be2d4fc
Author: ddekany <ddekany@apache.org>
Authored: Sun Feb 4 13:07:22 2018 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sun Feb 4 13:07:41 2018 +0100

----------------------------------------------------------------------
 .../org/apache/freemarker/servlet/jsp/TagDirectiveModel.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/bc9edc0e/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TagDirectiveModel.java
----------------------------------------------------------------------
diff --git a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TagDirectiveModel.java
b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TagDirectiveModel.java
index 3831c20..fdb3a58 100644
--- a/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TagDirectiveModel.java
+++ b/freemarker-servlet/src/main/java/org/apache/freemarker/servlet/jsp/TagDirectiveModel.java
@@ -134,6 +134,7 @@ class TagDirectiveModel extends JspTagModelBase implements TemplateDirectiveMode
         private final FreeMarkerPageContext pageContext;
         private boolean needPop = true;
         private final boolean needDoublePop;
+        private boolean closed = false;
 
         TagBodyContent(Writer out, Tag tag, FreeMarkerPageContext pageContext, boolean needDoublePop)
{
             super((JspWriter) out, false);
@@ -244,6 +245,11 @@ class TagDirectiveModel extends JspTagModelBase implements TemplateDirectiveMode
 
         @Override
         public void close() {
+            if (closed) {
+                return;
+            }
+            closed = true;
+            
             if (needPop) {
                 pageContext.popWriter();
             }


Mime
View raw message