The reason for the name change was to avoid conflicts.  People had
complained that getCategory() was interfering.  I would guess getLog()
might be less prone to this problem, but as soon as I make that
assumption it is going to cause a problem for someone.  I thought just
avoiding getter syntax would be safer.

john mcnally

On Mon, 2002-04-29 at 17:32, Daniel Rall wrote:
> Why not getLog() or getLogger()?  I realize that log() is a nice,
> short name, but it implies action when in fact all it does it return
> a logger object.  The getXxx() pattern is more appropriate.
> 
> [EMAIL PROTECTED] writes:
> 
> > jmcnally    02/04/26 16:28:27
> >
> >   Modified:    src/java/org/apache/torque/om BaseObject.java
> >   Log:
> >   less code
> >   
> >   Revision  Changes    Path
> >   1.10      +2 -9      
>jakarta-turbine-torque/src/java/org/apache/torque/om/BaseObject.java
> >   
> >   Index: BaseObject.java
> >   ===================================================================
> >   RCS file: 
>/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/om/BaseObject.java,v
> >   retrieving revision 1.9
> >   retrieving revision 1.10
> >   diff -u -r1.9 -r1.10
> >   --- BaseObject.java       26 Apr 2002 22:18:06 -0000      1.9
> >   +++ BaseObject.java       26 Apr 2002 23:28:27 -0000      1.10
> >   @@ -65,7 +65,7 @@
> >     *
> >     * @author <a href="mailto:[EMAIL PROTECTED]";>Frank Y. Kim</a>
> >     * @author <a href="mailto:[EMAIL PROTECTED]";>John D. McNally</a>
> >   - * @version $Id: BaseObject.java,v 1.9 2002/04/26 22:18:06 jmcnally Exp $
> >   + * @version $Id: BaseObject.java,v 1.10 2002/04/26 23:28:27 jmcnally Exp $
> >     */
> >    public abstract class BaseObject implements Persistent, Serializable
> >    {
> >   @@ -433,17 +433,10 @@
> >         */
> >        protected Category log()
> >        {
> >   -        Category log = null;
> >   -        if (this.log == null) 
> >   +        if (log == null) 
> >            {
> >                log = Category.getInstance(getClass().getName());
> >   -            this.log = log;
> >            }
> >   -        else 
> >   -        {
> >   -            log = this.log;
> >   -        }
> >   -        
> >             return log;
> >        }
> >    
> >   
> >   
> >   
> >
> > --
> > To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to