commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Waldhoff, Rodney" <>
Subject RE: [Latka] Developer's Guide / Coding Style
Date Fri, 22 Mar 2002 16:29:21 GMT
Right. I said that four emails ago.

-----Original Message-----
From: []
Sent: Friday, March 22, 2002 10:28 AM
Subject: RE: [Latka] Developer's Guide / Coding Style

>     public void close() throws SQLException {
>        _sourcePool.returnObject(this);
>     }

The public close method is well-defined by the Connection interface, so no
problem here.

>     private void _close() throws SQLException {
>        _delegate.close();
>     }

This method is a bit dubious. If I use a development tool, where I can just
see a list om my methods, I see the two close methods, but I have no clue
whatsoever what the difference with the public version is. In your example,
I would definitely rename the private _close method to closeDelegate or
closeDelegateConnection (without underscore). In that case, one can see the
difference in semantics between the public and private version of the method
very easy.

I think that in all cases you can give your method a better name that
reflects what the method really does.


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

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