68 lines
2.6 KiB
Diff
68 lines
2.6 KiB
Diff
From badde85d06cd5ccec026b93cc753dc3e93fb4132 Mon Sep 17 00:00:00 2001
|
|
From: Michal Srb <msrb@redhat.com>
|
|
Date: Fri, 9 Aug 2013 12:44:48 +0200
|
|
Subject: [PATCH] Remove android support
|
|
|
|
---
|
|
.../java/org/easymock/internal/MocksControl.java | 6 --
|
|
.../easymock/tests2/ClassExtensionHelperTest.java | 12 +--
|
|
2 files changed, 3 insertions(+), 159 deletions(-)
|
|
|
|
diff --git a/easymock/src/main/java/org/easymock/internal/MocksControl.java b/easymock/src/main/java/org/easymock/internal/MocksControl.java
|
|
index 131d22c..0782825 100644
|
|
--- a/easymock/src/main/java/org/easymock/internal/MocksControl.java
|
|
+++ b/easymock/src/main/java/org/easymock/internal/MocksControl.java
|
|
@@ -152,12 +152,6 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
|
|
return cached;
|
|
}
|
|
|
|
- // ///CLOVER:OFF
|
|
- if (AndroidSupport.isAndroid()) {
|
|
- return classProxyFactory = new AndroidClassProxyFactory();
|
|
- }
|
|
- // ///CLOVER:ON
|
|
-
|
|
try {
|
|
return classProxyFactory = new ClassProxyFactory();
|
|
} catch (final NoClassDefFoundError e) {
|
|
diff --git a/easymock/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java b/easymock/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java
|
|
index 04a413f..3f45555 100644
|
|
--- a/easymock/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java
|
|
+++ b/easymock/src/test/java/org/easymock/tests2/ClassExtensionHelperTest.java
|
|
@@ -15,7 +15,6 @@
|
|
*/
|
|
package org.easymock.tests2;
|
|
|
|
-import com.google.dexmaker.stock.ProxyBuilder;
|
|
import java.lang.reflect.InvocationHandler;
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Proxy;
|
|
@@ -25,7 +24,6 @@ import net.sf.cglib.proxy.Enhancer;
|
|
import net.sf.cglib.proxy.NoOp;
|
|
import org.easymock.EasyMock;
|
|
import static org.easymock.EasyMock.createMock;
|
|
-import org.easymock.internal.AndroidSupport;
|
|
import static org.easymock.internal.MocksControl.getControl;
|
|
import static org.easymock.internal.MocksControl.getMockedType;
|
|
import org.easymock.internal.MocksControl;
|
|
@@ -61,13 +59,9 @@ public class ClassExtensionHelperTest {
|
|
@Test
|
|
public void testGetControl_EnhancedButNotAMock() throws Exception {
|
|
final Object o;
|
|
- if (AndroidSupport.isAndroid()) {
|
|
- o = ProxyBuilder.forClass(ArrayList.class)
|
|
- .handler(NOOP_INVOCATION_HANDLER)
|
|
- .build();
|
|
- } else {
|
|
- o = Enhancer.create(ArrayList.class, NoOp.INSTANCE);
|
|
- }
|
|
+
|
|
+ o = Enhancer.create(ArrayList.class, NoOp.INSTANCE);
|
|
+
|
|
try {
|
|
getControl(o);
|
|
fail();
|
|
--
|
|
1.9.3
|
|
|