This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove NullPointerExceptions in FileDialog


Michael Koch wrote:
+ if (null == g)


I think its more common to write "g == null".


More common, but not necessarily wiser.


If you mistype:

g = null

you are in serous trouble

while if you mistype

null = g

you get a compiler error.

It is not my idea though: its Martin Fowler et al.'s.



--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]