You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@mit.edu> on 2007/05/31 15:06:16 UTC

Re: svn commit: r25206 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

On 5/30/07, blair@tigris.org <bl...@tigris.org> wrote:
> Author: blair
> Date: Wed May 30 11:32:51 2007
> New Revision: 25206
>
> Log:
> [ in subversion/bindings/javahl/ ]
>
> * src/org/tigris/subversion/javahl/NativeResources.java:
>   Style tweak, use 'if (null == X)' instead of 'if (X == null)'.

This seems unnecessary, since 'if (X = null)' is not legal in Java.

--dave

-- 
David Glasser | glasser@mit.edu | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r25206 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

Posted by Blair Zajac <bl...@orcaware.com>.
Daniel Rall wrote:
> On Thu, 31 May 2007, Mark Phippard wrote:
> 
>> On 5/31/07, David Glasser <gl...@mit.edu> wrote:
>>> On 5/30/07, blair@tigris.org <bl...@tigris.org> wrote:
>>>> Author: blair
>>>> Date: Wed May 30 11:32:51 2007
>>>> New Revision: 25206
>>>>
>>>> Log:
>>>> [ in subversion/bindings/javahl/ ]
>>>>
>>>> * src/org/tigris/subversion/javahl/NativeResources.java:
>>>>   Style tweak, use 'if (null == X)' instead of 'if (X == null)'.
>>> This seems unnecessary, since 'if (X = null)' is not legal in Java.
>> +1
>>
>> This is guarding against a problem that cannot happen and is not
>> standard for any code style I have seen.  I greatly prefer the other
>> style.
> 
> So do I, mostly due to the fact that I'm so much more accustomed to
> seeing it, and that it conceptually makes more sense to me.

That's my C/C++ coding style creeping into Java, where it is a good idea 
to that, since it is legal.

I'll revert the change.

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r25206 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

Posted by Daniel Rall <dl...@collab.net>.
On Thu, 31 May 2007, Mark Phippard wrote:

> On 5/31/07, David Glasser <gl...@mit.edu> wrote:
> >On 5/30/07, blair@tigris.org <bl...@tigris.org> wrote:
> >> Author: blair
> >> Date: Wed May 30 11:32:51 2007
> >> New Revision: 25206
> >>
> >> Log:
> >> [ in subversion/bindings/javahl/ ]
> >>
> >> * src/org/tigris/subversion/javahl/NativeResources.java:
> >>   Style tweak, use 'if (null == X)' instead of 'if (X == null)'.
> >
> >This seems unnecessary, since 'if (X = null)' is not legal in Java.
> 
> +1
> 
> This is guarding against a problem that cannot happen and is not
> standard for any code style I have seen.  I greatly prefer the other
> style.

So do I, mostly due to the fact that I'm so much more accustomed to
seeing it, and that it conceptually makes more sense to me.

Re: svn commit: r25206 - trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl

Posted by Mark Phippard <ma...@gmail.com>.
On 5/31/07, David Glasser <gl...@mit.edu> wrote:
> On 5/30/07, blair@tigris.org <bl...@tigris.org> wrote:
> > Author: blair
> > Date: Wed May 30 11:32:51 2007
> > New Revision: 25206
> >
> > Log:
> > [ in subversion/bindings/javahl/ ]
> >
> > * src/org/tigris/subversion/javahl/NativeResources.java:
> >   Style tweak, use 'if (null == X)' instead of 'if (X == null)'.
>
> This seems unnecessary, since 'if (X = null)' is not legal in Java.

+1

This is guarding against a problem that cannot happen and is not
standard for any code style I have seen.  I greatly prefer the other
style.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org