This is the mail archive of the
mailing list for the Java project.
Re: [PATCH] Remove NullPointerExceptions in FileDialog
Tom Tromey wrote:
"Fernando" == Fernando Nasser <email@example.com> writes:
Fernando> If you mistype:
Fernando> g = null
Fernando> you are in serous trouble
Fernando> while if you mistype
Fernando> null = g
Fernando> you get a compiler error.
In Java this problem isn't nearly as serious as it is in C++, because
there is no conversion from a reference type to boolean. You almost
always just get a compilation error if you make this typo.
I see. For Java it only applies if g is boolean and you are comparing
it with true or false...
And what about the patch itself? Nobody commented on the logical part
of the change. It does get rid of the exceptions.
Red Hat Canada Ltd. E-Mail: firstname.lastname@example.org
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9