Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1781539 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Feb 3, 2017
1 parent 2fc5d14 commit 8956df9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions java/org/apache/jasper/compiler/Generator.java
Expand Up @@ -1075,13 +1075,9 @@ public void visit(Node.ELExpression n) throws JasperException {
@Override
public void visit(Node.IncludeAction n) throws JasperException {

String flush = n.getTextAttribute("flush");
Boolean flush = Boolean.valueOf(n.getTextAttribute("flush"));
Node.JspAttribute page = n.getPage();

boolean isFlush = false; // default to false;
if ("true".equals(flush))
isFlush = true;

n.setBeginJavaLine(out.getJavaLine());

String pageParam;
Expand All @@ -1107,7 +1103,7 @@ public void visit(Node.IncludeAction n) throws JasperException {
out.printin("org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "
+ pageParam);
printParams(n, pageParam, page.isLiteral());
out.println(", out, " + isFlush + ");");
out.println(", out, " + flush + ");");

n.setEndJavaLine(out.getJavaLine());
}
Expand Down

0 comments on commit 8956df9

Please sign in to comment.