Do not assert that InvocationHandler.invoke args should be non-null

Bug: https://code.google.com/p/dexmaker/issues/detail?id=27
Bug: 10862083

(cherry picked from commit 744d6f6da5766da5c9ed5d6732604d5e2004771e)

Change-Id: I209149d2db1f1adf3ad315243a862de73a616f12
diff --git a/README b/README
index 6c5b186..e3e7551 100644
--- a/README
+++ b/README
@@ -18,5 +18,7 @@
     (see https://code.google.com/p/dexmaker/issues/detail?id=20)
 bug-8297640.patch: temporary workaround for a breakage in object instantiation
     (see https://code.google.com/p/dexmaker/issues/detail?id=22)
+bug-10862083.patch: Do not assert that InvocationHandler.invoke args should be non-null
+    (see https://code.google.com/p/dexmaker/issues/detail?id=27)
 
 (to apply, run 'patch -p0 < bug-xyz.patch' from a fresh src)
diff --git a/bug-10862083.patch b/bug-10862083.patch
new file mode 100644
index 0000000..0dec4c3
--- /dev/null
+++ b/bug-10862083.patch
@@ -0,0 +1,16 @@
+diff --git a/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java b/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
+index 268f2fd..2775a63 100644
+--- a/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
++++ b/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
+@@ -45,11 +45,6 @@ final class InvocationHandlerAdapter implements InvocationHandler {
+             return System.identityHashCode(proxy);
+         }
+ 
+-        if (args == null) {
+-            throw new IllegalArgumentException();
+-        }
+-
+-
+         ProxiedMethod proxiedMethod = new ProxiedMethod(method);
+         return handler.handle(new InvocationImpl(proxy, proxiedMethod, args, SequenceNumber.next(),
+                 proxiedMethod));
diff --git a/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java b/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
index 268f2fd..2775a63 100644
--- a/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
+++ b/src/mockito/java/com/google/dexmaker/mockito/InvocationHandlerAdapter.java
@@ -45,11 +45,6 @@
             return System.identityHashCode(proxy);
         }
 
-        if (args == null) {
-            throw new IllegalArgumentException();
-        }
-
-
         ProxiedMethod proxiedMethod = new ProxiedMethod(method);
         return handler.handle(new InvocationImpl(proxy, proxiedMethod, args, SequenceNumber.next(),
                 proxiedMethod));