commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Dever" <>
Subject RE: [httpclient][patch] StatusLine encapsulation
Date Wed, 04 Sep 2002 13:36:06 GMT
What you say is true Ryan, but the question is "if I write a constructor, is
super() called implicitly in that constructor?"  I don't know the answer to

But I had a look at the sun source for it is undeclared.  There
are no constructors declared for Object so the compiler would generate the
default one.  There are no instance variables in the class so the generated
constructor would be empty.  

Therefore, it would be better to leave out the call to super() when
extending class Object.

BTW: there is some effort in gjc to optimize away the call to the empty
Object constructor, so this is another reason to leave out the explicit

-----Original Message-----
From: Ryan Lubke [mailto:Ryan.Lubke@Sun.COM]
Sent: Wednesday, September 04, 2002 8:28 AM
To: Jakarta Commons Developers List
Subject: Re: [httpclient][patch] StatusLine encapsulation

Actually, I think it's only done on the behalf of the developer in the
case where the class has no constructor.  A no-arg constructor will be
added to the class with a call to super().  In cases where you have an
explicit constructors, what you see is what you get.

On Wed, 2002-09-04 at 04:31, Ortwin Gl├╝ck wrote:
> All very nice. And it's compatible with existing code.
> My critizism is only cosmetics: you can ommit the call to super() in the 
> constructor (it's always done automatically).
> Jeff Dever wrote:
> > This is my response for the bug:
> >
> > 
> > I added a new StatusLine class and added it as an instance variable to
> > HttpMethodBase.  Removed individual statusCode and statusText members.
> > Removed the parsing of the status line into the StatusLine constructor.
> > HttpMethodBase.readStatusLine() still checks for the http version and
> > sets the (dreaded) isHttp11 boolean.  There was an interface change to
> > the HttpMethod interface to getStatusLine().
> > 
> > I like this solution as it get some of the code out of HttpMethodBase
> > and recognizes the uniqueness of the Status-Line.
> > 
> > What do ya'll think?
> > 
> > PS: This is based on a suggestion by Vincent Massol.
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message