From 5a09774353bdab1ab22a0ec9c71d0ac165cf2ccc Mon Sep 17 00:00:00 2001 From: Damjan Jovanovic Date: Sat, 4 Aug 2012 07:29:39 -0600 Subject: [PATCH] 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. --- test/Arrays.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Arrays.java b/test/Arrays.java index e00bbf5688..42e958068a 100644 --- a/test/Arrays.java +++ b/test/Arrays.java @@ -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); } } }