Browse files

tests don't compile when building with OpenJDK

I get this error when compiling with "make openjdk=...." on both x86_64 and

compiling test classes
test/ error: reference to equals is ambiguous, both method
equals(float[],float[]) in Arrays and method equals(Object[],Object[]) in
Arrays match
      expect(java.util.Arrays.equals(null, null));

test/ error: reference to hashCode is ambiguous, both method
hashCode(double[]) in Arrays and method hashCode(Object[]) in Arrays match

The attached patch fixes this.
  • Loading branch information...
1 parent 2fb2fd9 commit 5a09774353bdab1ab22a0ec9c71d0ac165cf2ccc @DamjanJovanovic DamjanJovanovic committed with dicej Aug 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/
@@ -87,12 +87,12 @@ public static void main(String[] args) {
expect(! java.util.Arrays.equals(b, new Object[4]));
expect(! java.util.Arrays.equals(a, null));
expect(! java.util.Arrays.equals(null, b));
- expect(java.util.Arrays.equals(null, null));
+ expect(java.util.Arrays.equals((Object[])null, (Object[])null));
b[0] = a[0];
expect(java.util.Arrays.equals(a, b));
- java.util.Arrays.hashCode(null);
+ java.util.Arrays.hashCode((Object[])null);

0 comments on commit 5a09774

Please sign in to comment.