This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Patch: java.io.File
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: 13 Oct 2003 13:58:20 -0600
- Subject: Re: FYI: Patch: java.io.File
- References: <E1A8vi1-0003Dn-00@majestix.konqueror.de>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Koch <konqueror@gmx.de> writes:
Michael> + * java/io/File.java: Reformated.
Michael> + (equals): Check for obj == null.
Michael> public boolean equals (Object obj)
Michael> {
Michael> + if (obj == null)
Michael> + return false;
Michael> +
Michael> if (! (obj instanceof File))
This addition isn't necessary.
`obj instanceof File' will return false when obj==null.
I know there are redundant checks for this in other parts of the tree.
I think we should remove these.
Tom