commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [Latka] Developer's Guide / Coding Style
Date Fri, 22 Mar 2002 16:28:24 GMT

>     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: <>

View raw message