This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Remove NullPointerExceptions in FileDialog
- From: Fernando Nasser <fnasser at redhat dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 16 Dec 2003 15:38:19 -0500
- Subject: Re: [PATCH] Remove NullPointerExceptions in FileDialog
- Organization: Red Hat Canada
- References: <3FDF676F.3040404@redhat.com> <20031216202307.GA24859@mail.konqueror.de>
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