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: FYI: Patch: java.io.File


>>>>> "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


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