On 30/01/2013 11:41, Jess Holle wrote: > Is anyone else seeing regressions due to this change? > > They appear as NullPointerExceptions from java.io.Writer.write(String) > where the writer in question is a JSPWriter. > > This was addressed long ago by the fix for > https://issues.apache.org/bugzilla/show_bug.cgi?id=35410, but the > revision reverts the fix as it is not specification compliant. > > On the flip side, how do we know the fix was not specification > compliant? Did a new TCK reject this behavior? Or were other compliant > implementations found not to have this behavior? Or...?
A more careful reading of the specification document The complete logic chain is: >From JSP.9.4.3 <%= obj %> => out.print(obj) >From JSP.1.8.3 out is a JspWriter >From the JspWriter#print(Object) Javadoc The string produced by the java.lang.String.valueOf(Object) method is written to the JspWriter’s buffer or, if no buffer is used, directly to the underlying writer. >From the implementation of java.lang.String#valueOf(Object) return (obj == null) ? "null" : obj.toString(); So, obj.toString() is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer. Writing to the underlying writer or buffer uses write(String) write(null) triggers the NPE. > I'm now left trying to figure out what to do about this change -- push > those which ran afoul of this to fix their code or patch the fix back > into our Tomcat. The choice is yours but the view of the Tomcat committers is that apps that hit this issue are not specification compliant. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
