hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Fixes to nio source for 1.5
Date Fri, 18 Jan 2008 02:21:34 GMT
On 18/01/2008, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Fri, Jan 18, 2008 at 01:07:56AM +0000, sebb wrote:
> > On 17/01/2008, Oleg Kalnichevski <olegk@apache.org> wrote:
> > >
> > > On Thu, 2008-01-17 at 21:22 +0000, sebb wrote:
> > > > There are quite a few missing @Override markers in the nio source
> > > > files, e.g. for toString(), clone(), etc.
> > > >
> > > > Would it be OK if I fix those that are clearly intended to be overrides?
> > > >
> > > > Likewise, now that generics are being used, there are some casts that
> > > > can be removed. Shall I do those as well?
> > > >
> > > > S///
> > > >
> > >
> > > Sure. Go for it.
> > >
> >
> > OK, done.
> >
> > There are also quite a few warnings about variable hiding, e.g. where
> > a parameter has the same name as a field in the class or super-class.
> > This can lead to subtle bugs.
> >
> > Is there a policy on this?
> > Or maybe a naming convention for parameters and local variables?
> >
>
> I have a (bad) habit of always qualifying instance variables with
> "this.xxx". It helps me distinguish them from parameters, but I
> understand not everyone may like such notation.
>

That's fine, but that will only detect a missing instance variable,
not a parameter or local variable that is being used instead of an
instance variable.

When I was writing C, we used to use prefixes such as l_, p_, m_, and
g_ for local, parameter, module and global variables.

m and g are not really relevant to Java.

One could use l_ for local and p_ for parameters.

> Oleg
>
>
> > > Oleg
> > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > > For additional commands, e-mail: dev-help@hc.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > > For additional commands, e-mail: dev-help@hc.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> > For additional commands, e-mail: dev-help@hc.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message