• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff -ur src/mockito/java/com/google/dexmaker/mockito/DexmakerMockMaker.java patched_src/mockito/java/com/google/dexmaker/mockito/DexmakerMockMaker.java
2--- src/mockito/java/com/google/dexmaker/mockito/DexmakerMockMaker.java	2013-01-07 11:27:13.000000000 -0800
3+++ patched_src/mockito/java/com/google/dexmaker/mockito/DexmakerMockMaker.java	2013-02-15 11:27:44.000000000 -0800
4@@ -45,9 +45,10 @@
5             Class[] classesToMock = new Class[extraInterfaces.length + 1];
6             classesToMock[0] = typeToMock;
7             System.arraycopy(extraInterfaces, 0, classesToMock, 1, extraInterfaces.length);
8+            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
9             @SuppressWarnings("unchecked") // newProxyInstance returns the type of typeToMock
10-            T mock = (T) Proxy.newProxyInstance(typeToMock.getClassLoader(),
11-                    classesToMock, invocationHandler);
12+            T mock = (T) Proxy.newProxyInstance(contextClassLoader, classesToMock,
13+                    invocationHandler);
14             return mock;
15
16         } else {
17