tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46985] Impossible condition in coyote.http11.Http11Processor.process(Socket socket)
Date Tue, 19 May 2009 00:07:33 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46985





--- Comment #4 from Sebb <sebb@apache.org>  2009-05-18 17:07:32 PST ---
(In reply to comment #2)
> That "if (soTimeout != oldSoTimeout) { .. }" works in TC 5.5, because of some
> block of code that precedes it, but is dead in TC 6.0 because that preceding
> block is removed. 

OK, I see - the condition did once mean something.

> > Both the method and the class have a variable called "socket" which may be part
> > of the problem - is the method trying to set the instance socket to have the
> > same timeout as the parameter socket, or vice versa?
> > 
> > The socket parameter should be renamed.
> > 
> 
> No error there, no need to rename.

Not an error, but it's very confusing to use the same name for a parameter and
an instance variable.

Using the same name is just about OK in short ctors or one-line set() methods,
but elsewhere it's not helpful.

> Both are pointing to the same object. Also, you may note, that
> this.socket is set back to null at the end of the method.

Huh? The socket parameter may or may not be the same as the instance variable.

I don't see either being set to null.

> 
> > Note that the Javadoc appears to be completely wrong as well.
> 
> Oh, it says about input and output streams. Those are provided by the socket.

Indeed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


Mime
View raw message