-1. Not equivalent.
Boolean.java in 8u121:
public static Boolean valueOf(String s) {
return parseBoolean(s) ? TRUE : FALSE;
}
public static boolean parseBoolean(String s) {
return ((s != null) && s.equalsIgnoreCase("true"));
}
It compares case-insensitively. Old code uses "equals".
(I feared that it might allow "on" or "yes", so I looked into sources)
2017-02-03 14:26 GMT+03:00 <[email protected]>:
> Author: markt
> Date: Fri Feb 3 11:26:44 2017
> New Revision: 1781539
>
> URL: http://svn.apache.org/viewvc?rev=1781539&view=rev
> Log:
> Simplify code
>
> Modified:
> tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
>
> Modified: tomcat/trunk/java/org/apache/jasper/compiler/Generator.java
> URL:
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Generator.java?rev=1781539&r1=1781538&r2=1781539&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/jasper/compiler/Generator.java (original)
> +++ tomcat/trunk/java/org/apache/jasper/compiler/Generator.java Fri Feb 3
> 11:26:44 2017
> @@ -1075,13 +1075,9 @@ class Generator {
> @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;
> @@ -1107,7 +1103,7 @@ class Generator {
>
> 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());
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]