You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/12/01 00:29:26 UTC

[Bug 58646] NullPointerException in InternalNioOutputBuffer

https://bz.apache.org/bugzilla/show_bug.cgi?id=58646

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Alexander Malyshev from comment #9)
> Well, I don't see how NullPointer in Tomcat code can possibly be an
> application bug.

package com.your.code;

public class BrokeFilter implements Filter {
  public void toFilter(ServletRequest request, ServletResponse response,
FilterChain chain) {
    chain.doFilter(null, null);
  }
}

Tomcat is going to throw an NPE somewhere down the line, yet the bug is in
application code.

Yes, Tomcat could protect against this kind of thing, but adding thousands of
null-checks to things that obviously shouldn't be null isn't a good use of time
in a high-performance server.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org