Merge "Fix non-varargs call of varargs method warning" am: 6b3ecd3217 am: 3e84b0f075 am: eb1b2345f9

Original change: https://android-review.googlesource.com/c/platform/libcore/+/2045563

Change-Id: Ied86319bd55c97055ed3c79dc676140be2a6d89c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/ojluni/src/test/java/lang/invoke/InvokeWithArgumentsTest.java b/ojluni/src/test/java/lang/invoke/InvokeWithArgumentsTest.java
index 63a2101..df3c247 100644
--- a/ojluni/src/test/java/lang/invoke/InvokeWithArgumentsTest.java
+++ b/ojluni/src/test/java/lang/invoke/InvokeWithArgumentsTest.java
@@ -72,7 +72,9 @@
 
         // Note: the actual array is not preserved, the elements will be
         // unpacked and then packed into a new array before invoking the method
-        String[] expected = (String[]) mh.invokeWithArguments(actual);
+        // Android-changed: Cast to Object[] to avoid compilation warning.
+        // String[] expected = (String[]) mh.invokeWithArguments(actual);
+        String[] expected = (String[]) mh.invokeWithArguments((Object[]) actual);
 
         Assert.assertTrue(actual != expected, "Array should not pass through");
         Assert.assertEquals(actual, expected, "Array contents should be equal");