struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [struts] branch master updated: Fix meaningless close
Date Wed, 18 Nov 2020 06:10:04 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 0339ff4  Fix meaningless close
     new 8da6a53  Merge pull request #445 from lcc/fix-meaningless-close
0339ff4 is described below

commit 0339ff4550a4975e6f293ce7fde77eeffbf9acb2
Author: Lucas Cabral <lcc2@cesar.org.br>
AuthorDate: Tue Nov 17 19:04:53 2020 -0300

    Fix meaningless close
---
 .../src/main/java/org/apache/struts2/jasper/compiler/JspReader.java     | 2 --
 .../src/main/java/org/apache/struts2/jasper/compiler/Parser.java        | 1 -
 2 files changed, 3 deletions(-)

diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspReader.java
b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspReader.java
index 1abd9f9..808687e 100644
--- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspReader.java
+++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspReader.java
@@ -209,7 +209,6 @@ class JspReader {
         CharArrayWriter caw = new CharArrayWriter();
         while (!stop.equals(mark()))
             caw.write(nextChar());
-        caw.close();
         reset(oldstart);
         return caw.toString();
     }
@@ -595,7 +594,6 @@ class JspReader {
             char buf[] = new char[1024];
             for (int i = 0 ; (i = reader.read(buf)) != -1 ;)
                 caw.write(buf, 0, i);
-            caw.close();
             if (current == null) {
                 current = new Mark(this, caw.toCharArray(), fileid, 
                                    getFile(fileid), master, encoding);
diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Parser.java
b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Parser.java
index 24a8c16..a8cef55 100644
--- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Parser.java
+++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/Parser.java
@@ -324,7 +324,6 @@ class Parser implements TagConstants {
                 ++i;
             }
         }
-        cw.close();
         return cw.toString();
     }
 


Mime
View raw message