Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.5.2
-
Component/s: Class Extension
-
Labels:None
-
Number of attachments :
Description
When attempting to mock a class in an Eclipse test plugin (a plugin that tests another plugin), a CodeGenerationException is generated when running under OSGi classloaders (the Run As | JUnit Plugin Test).
This is similar to the bug ID: 2759024, but not quite the same.
There are long descriptions of how JMock solved it: http://jira.codehaus.org/browse/JMOCK-124
and Mockito solved the same issue: http://code.google.com/p/mockito/issues/detail?id=11&can=1
The last comment in the Mockito issue ( http://code.google.com/p/mockito/issues/detail?id=11&can=1#c29 ) looks to be the key to a solution. All about taking care which classloader cglib uses,