[kaffe] Arrays.equals

Dalibor Topic robilad at yahoo.com
Thu May 22 04:54:02 PDT 2003


Salut Daniel,

--- Daniel Bonniot <Daniel.Bonniot at inria.fr> wrote:
> 
> Arrays.equals in Kawa does not handle properly null elements. Here is a 
> testcase (is this the correct format for Kawa's regression tests?)

yes. See http://www.kaffe.org/pipermail/kaffe/2001-September/007425.html . If
you could add the contents of that mail to FAQ.debugging, that would be great.
 
> import java.util.*;
> 
> public class ArraysTest
> {
>   public static void main(String[] args)
>   {
>     final String[] a1 = { "", null };
>     final String[] a2 = { "", null };
> 
>     System.out.println(Arrays.equals(a1, a2));
>   }
> }
> 
> /* Expected Output:
> true
> */
> 
> Kawa CVS prints false. I attach a patch that fixes this problem.

thanks, I've checked both in.
 
> A note about source code formatting. It seems that the convention in 
> Kawa is to use tabs for indentation (although this is not documented, see
> http://www.kaffe.org/doc/kaffe/FAQ.coding-style).

The usual convention seems to be to use what's there, and avoid indentation
wars ;)

> I usually use Emacs, and the JDEE to edit Java sources. A useful feature 
> of this emacs mode is that you can set up preferences (notably 
> indentation style) in a central project file. Maybe it would be useful 
> to include such a file in CVS. It would both make it easier to edit the 
> sources, and ensure a consistent formatting (for those using JDEE, of 
> course). I attach a first attempt as prj.el (it should go to the 
> toplevel directory). What do people think about this?

I can put it in the developers directory. I'm using JDEE myself, so that's
useful for me when I'm hacking on new files.

But I wouldn't want to enforce a specific indentation style, since we are using
third party sources from different projects and they may have different
opinions on indentation. Re-indenting their files could make merging harder
than necessary.

cheers,
dalibor topic

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




More information about the kaffe mailing list