On Mar 11, 2013, at 3:37 PM, Mark Thomas wrote: > On 09/03/2013 23:03, Nick Williams wrote: >> Mark, >> >> I noticed the HttpServletRequest upgrade method still had the >> signature void upgrade(HttpUpgradeHandler) when it should be <T >> extends HttpUpgradeHandler> T upgrade(Class<T>) per the latest spec. >> What's your status on getting this changed? > > Haven't even looked at it. > >> I started to try to clean >> this up a bit (I can email you a partial patch that has compile >> errors in WebSocketServlet and WsServlet to save you some time, if >> you want), but I hit a road block with WsProtocolHandler, which is >> going to need a zero-arg constructor. I stopped there to avoid >> stepping on your toes. > > No need to worry about my toes. Go ahead and make the changes. The (off > the top of my head) approach I suggest for WsProtocolHandler is change > the current constructor to (I was going to say init) preInit() or any > other better name you can thing of and throw an exception in init() if > preInit hasn't been called by the time init() is called. > > That should work... > > If it doesn't feel free to refactor to get something that does.
Tried that. Got into a whole heap of trouble. Bug #54728 has my thorough analysis and attempted patches. This one concerns me a little. I don't like the change to the spec here (public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass)). I think the original method (public void upgrade(HttpUpgradeHandler handler)) made much more sense. :-( N --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org