harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib] HARMONY-820 (beautifying of java.beans classes)
Date Tue, 11 Jul 2006 09:44:50 GMT
2006/7/11, Alexei Zakharov <alexei.zakharov@gmail.com>:
> Hi,
>
> I agree with your suggestion - we may throw away both variables. I
> just have missed this. About spaces after "if" please see [1]. This
> was my code style guide. BTW, this seems to be a nice question. Do we
> have some "officially approved" style guide in Harmony?

We were close to agree on this one

http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200603.mbox/%3c441AE45B.6040604@apache.org%3e

IIRC nobody objected but it was not accepted as an official decision.
I use it.

Thanks,
Mikhail




>
> [1] http://java.sun.com/docs/codeconv/html/CodeConventions.doc7.html#682
>
>
> 2006/7/11, Mikhail Loenko <mloenko@gmail.com>:
> > Hi Alexei
> >
> > Why do you think that your proposed style:
> >     public Object get(Object oldInstance) {
> >         ObjectNode node;
> >         Object result;
> >
> >         if (oldInstance == null) {
> >             return null;
> >         }
> >
> >         node = nodes.get(oldInstance);
> >         result = getValue(node);
> >
> >         return result;
> >     }
> >
> > is more transparent than original one:
> >     public Object get(Object oldInstance) {
> >         if(oldInstance == null) {
> >             return null;
> >         }
> >
> >         ObjectNode node = (ObjectNode) nodes.get(oldInstance);
> >         Object result = getValue(node);
> >         return result;
> >     }
> >
> >
> > I'd rather change it something like this way:
> >     public Object get(Object oldInstance) {
> >         if(oldInstance == null) {
> >             return null;
> >         }
> >
> >         return getValue( (ObjectNode) nodes.get(oldInstance) );
> >     }
> > At least I'd get rid of the 'result' variable
> >
> >
> > Thanks,
> > Mikhail
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Alexei Zakharov,
> Intel Middleware Product Division
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message