2012/3/16 Christopher Schultz <ch...@christopherschultz.net>: > Konstantin, > > On 3/15/12 2:14 PM, kkoli...@apache.org wrote: >> Author: kkolinko >> Date: Thu Mar 15 18:14:44 2012 >> New Revision: 1301123 >> >> URL: http://svn.apache.org/viewvc?rev=1301123&view=rev >> Log: >> Slightly improve performance of UDecoder >> Backports r1203054 from 7.0.x. > > [Snip] > >> + /** Unexpected end of data. */ >> + private static final IOException EXCEPTION_EOF = new >> DecodeException("EOF"); >> + >> + /** %xx with not-hex digit */ >> + private static final IOException EXCEPTION_NOT_HEX_DIGIT = new >> DecodeException( >> + "isHexDigit"); >> + >> + /** %-encoded slash is forbidden in resource path */ >> + private static final IOException EXCEPTION_SLASH = new DecodeException( >> + "noSlash"); > > When using static Exception objects, doesn't that completely mess with > the stack trace? >
Parameter parsing cannot throw exceptions in Servlet API. All of those exceptions are caught and discarded. Stack trace was not visible there unless you turned on the debugging. The DecodeException class used there overrides fillInStackTrace() so that no time is wasted to fill in the stack trace. No messed stack is printed - it is not printed at all. Just exception text will be different. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org