And just to be an annoying nudge, I'll throw in my 0.02 :

   public Object get(Object oldInstance) {

       if (oldInstance == null) {
           return null;
       }

       return getValue((ObjectNode) nodes.get(oldInstance));
   }


(added newline after method decl, space after the if, and removed spaces
inside getValue())

:)

geir


Mikhail Loenko wrote:
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to