tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Heil" <>
Subject AW: DefaultServlet and getOutputStream() / getWriter()
Date Sat, 09 Oct 2004 09:28:39 GMT

> That's definitely why I am not interested by code cleanups done by folks
who might not know all the small tricks: the risk of breaking stuff is far
greater than the gain.

Why are you soo hostile?
I am just trying to get into the code and if I understand it, I will
propably start to contribute something. But I need to start somewhere and I
cannot know "all the small tricks" from beginning. THAT IS WHY I AM ASKING!
I did not say "remove that shit", nor did I say "this is stupid". I just
asked why it is done that way.

Additionally, every change I suggested (on tomcat-user) was definitly not
changing any behaviour, but maybe improving performance.

So I need to give that back to the authors. Things that are not self-evident
should be documented in code. There is nothing.
And again, please see, that this is no allegation. But someone will know it
and it is not in the code, so you should accept questions.

You told me:
> ... submit more significant patches ...

How should I, if I cannot even get information about easy things?

> For this particular case, you should look into the API javadocs.

That's what I have done for some hours.

"Returns a ServletOutputStream suitable for writing binary data in the
response. The servlet container does not encode the binary data. 
java.lang.IllegalStateException - if the getWriter method has been called on
this response - if an input or output exception occurred"

If I believe that javadocs, THERE IS NO REASON to do what the code does,
sind getWriter is never called before getOutputStream, so there will never
be the IllegalStateException and half of the code is obsolete.

That is exactly the reason I am asking.


View raw message