My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 201: Remove CGLibHacker workaround in MockitoMethodInvocationControl (Mockito 1.8.1)
2 people starred this issue and may be notified of changes. Back to list
Status:  Assigned
Owner:  johan.ha...@gmail.com


Sign in to add a comment
 
Project Member Reported by johan.ha...@gmail.com, Nov 11, 2009
Since Mockito 1.8.1 the CGLibHacker is a member of MethodInterceptorFilter
which means that the workaround in performIntercept can be removed (if we
change the CGLibHacker member instance in
org.mockito.internal.creation.MethodInterceptorFilter).
Nov 25, 2009
#1 joesabba...@gmail.com
Getting this stacktrace when using PowerMockRunner with powermock 1.3.1 and mockito
1.8.1, not sure if it's related to this issue:

java.lang.NoSuchMethodError:
org.mockito.internal.creation.MethodInterceptorFilter.<init>(Ljava/lang/Class;Lorg/mockito/internal/MockHandler;)V
	at
org.powermock.api.mockito.internal.mockcreation.MockCreator.createMethodInvocationControl(MockCreator.java:78)
	at org.powermock.api.mockito.internal.mockcreation.MockCreator.mock(MockCreator.java:53)
	at org.powermock.api.mockito.PowerMockito.mock(PowerMockito.java:80)
	at
org.powermock.api.extension.listener.AnnotationEnabler.beforeTestMethod(AnnotationEnabler.java:58)
	at
org.powermock.tests.utils.impl.PowerMockTestNotifierImpl.notifyBeforeTestMethod(PowerMockTestNotifierImpl.java:90)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.executeTest(PowerMockJUnit44RunnerDelegateImpl.java:307)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTestInSuper(PowerMockJUnit47RunnerDelegateImpl.java:112)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:73)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:297)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:222)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:161)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:135)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at
org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:133)
	at
org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:112)
	at
org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:44)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Nov 25, 2009
#2 joesabba...@gmail.com
Reverting back to Mockito 1.8.0 seems to solve the NoSuchMethodError, so this does
seem related
Nov 25, 2009
Project Member #3 johan.ha...@gmail.com
1.3.0 and 1.3.1 doesn't work with Mockito 1.8.1. You need to use the trunk version of
PowerMock in order to use version 1.8.1. We'll probably have to release a new version
soon I suppose.
Jul 22, 2010
Project Member #4 johan.ha...@gmail.com
(No comment was entered for this change.)
Labels: -Milestone-Release1.4 Milestone-Release1.5
Aug 8, 2010
Project Member #5 johan.ha...@gmail.com
(No comment was entered for this change.)
Labels: -Milestone-Release1.5 Milestone-Future
Sign in to add a comment

Powered by Google Project Hosting