[kaffe] Arrays.equals
Daniel Bonniot
Daniel.Bonniot at inria.fr
Wed May 21 17:17:01 PDT 2003
Arrays.equals in Kawa does not handle properly null elements. Here is a
testcase (is this the correct format for Kawa's regression tests?)
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.
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).
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?
Daniel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Arrays.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20030521/18e4e5a0/attachment-0004.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prj.el
Url: http://kaffe.org/pipermail/kaffe/attachments/20030521/18e4e5a0/attachment-0005.txt
More information about the kaffe
mailing list