This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit fb6c67c9f9d1a753458b0e2a730c0c4c21ecc566 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 23 20:17:40 2020 +0100 pageContext is never null --- test/webapp/jsp/pageContext1.jsp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/test/webapp/jsp/pageContext1.jsp b/test/webapp/jsp/pageContext1.jsp index d4bb322..1f44f97 100644 --- a/test/webapp/jsp/pageContext1.jsp +++ b/test/webapp/jsp/pageContext1.jsp @@ -17,23 +17,19 @@ <%@ page import="java.io.IOException" contentType="text/plain"%> <% boolean flush = Boolean.parseBoolean(request.getParameter("flush")); - if (pageContext != null) { - try { - if (flush) { - out.println("Flush"); - pageContext.include("/jsp/pageContext2.jsp", true); - } else { - pageContext.include("/jsp/pageContext2.jsp"); - } - } catch (IOException e) { - out.println("OK"); - return; - } catch (Throwable t) { - out.println("FAILED. Expected IOException, received: " + t.getClass().getName()); - return; + try { + if (flush) { + out.println("Flush"); + pageContext.include("/jsp/pageContext2.jsp", true); + } else { + pageContext.include("/jsp/pageContext2.jsp"); } - out.println("FAILED. Expected IOException."); - } else { - out.println("FAILED. Expected IOException."); + } catch (IOException e) { + out.println("OK"); + return; + } catch (Throwable t) { + out.println("FAILED. Expected IOException, received: " + t.getClass().getName()); + return; } + out.println("FAILED. Expected IOException."); %> \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org