https://bz.apache.org/bugzilla/show_bug.cgi?id=61604
Bug ID: 61604 Summary: IllegalStateException in SmapStratum on empty JSP Product: Tomcat 9 Version: 9.0.1 Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: apa...@stefan-sielaff.de Target Milestone: ----- We use a JSP that is included at several points to inject data into pages. At the moment the whole content is commented out. Tomcat 8.5 (production environment) ignores that page, respectively generates no output as expected. Tomcat 9.0.1 (development environment) throws an IllegalstateException. This is caused by a change in SmapStratum, which previously returned null on getString() if lineData was null, now it throws an unhandled exception. Reproduction: Create an "empty" JSP or one containing only JSP comments and using trimDirectiveWhitespaces="true": <%@ page pageEncoding="UTF-8" contentType="text/html; charset=utf-8" language="java" import="java.util.Vector" errorPage="" trimDirectiveWhitespaces="true" %> <%-- This is a comment --%> Result: java.lang.IllegalStateException at org.apache.jasper.compiler.SmapStratum.getSmapStringInternal(SmapStratum.java:318) at org.apache.jasper.compiler.SmapStratum.getSmapString(SmapStratum.java:304) at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:145) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:473) [...] Expected result: an empty page -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org