tests don't compile when building with OpenJDK

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

compiling test classes
test/Arrays.java:90: 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/Arrays.java:95: error: reference to hashCode is ambiguous, both method
hashCode(double[]) in Arrays and method hashCode(Object[]) in Arrays match
      java.util.Arrays.hashCode(null);

The attached patch fixes this.
This commit is contained in:
Damjan Jovanovic 2012-08-04 07:29:39 -06:00 committed by Joel Dice
parent 2fb2fd9bb0
commit 5a09774353

View File

@ -87,12 +87,12 @@ public class Arrays {
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(a);
java.util.Arrays.hashCode(null);
java.util.Arrays.hashCode((Object[])null);
}
}
}