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: Code cleanup for last commit...
Date Sun, 04 Feb 2018 12:06:50 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae db7c6d547 -> 4ba637f15


Code cleanup for last commit...


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

Branch: refs/heads/2.3-gae
Commit: 4ba637f15948ce5d4bec7e8a1ecaacd4d4502e3c
Parents: db7c6d5
Author: ddekany <ddekany@apache.org>
Authored: Sun Feb 4 13:06:43 2018 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sun Feb 4 13:06:43 2018 +0100

----------------------------------------------------------------------
 .../freemarker/ext/jsp/TagTransformModel.java   | 32 +++++++++-----------
 1 file changed, 15 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/4ba637f1/src/main/java/freemarker/ext/jsp/TagTransformModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/jsp/TagTransformModel.java b/src/main/java/freemarker/ext/jsp/TagTransformModel.java
index 0190948..55b0272 100644
--- a/src/main/java/freemarker/ext/jsp/TagTransformModel.java
+++ b/src/main/java/freemarker/ext/jsp/TagTransformModel.java
@@ -292,7 +292,7 @@ class TagTransformModel extends JspTagModelBase implements TemplateTransformMode
         private final FreeMarkerPageContext pageContext;
         private boolean needPop = true;
         private final boolean needDoublePop;
-        private boolean colosed = false;
+        private boolean closed = false;
         
         TagWriter(Writer out, Tag tag, FreeMarkerPageContext pageContext, boolean needDoublePop)
{
             super((JspWriter) out, false);
@@ -394,27 +394,25 @@ class TagTransformModel extends JspTagModelBase implements TemplateTransformMode
         
         @Override
         public void close() {
-            if (colosed) {
+            if (closed) {
                 return;
             }
+            closed = true;
+            
+            if (needPop) {
+                pageContext.popWriter();
+            }
+            pageContext.popTopTag();
             try {
-                if (needPop) {
-                    pageContext.popWriter();
-                }
-                pageContext.popTopTag();
-                try {
-                    if (isTryCatchFinally) {
-                        ((TryCatchFinally) tag).doFinally();
-                    }
-                    // No pooling yet
-                    tag.release();
-                } finally {
-                    if (needDoublePop) {
-                        pageContext.popWriter();
-                    }
+                if (isTryCatchFinally) {
+                    ((TryCatchFinally) tag).doFinally();
                 }
+                // No pooling yet
+                tag.release();
             } finally {
-                colosed = true;
+                if (needDoublePop) {
+                    pageContext.popWriter();
+                }
             }
         }
         


Mime
View raw message