gordonad / powermock

Automatically exported from code.google.com/p/powermock
0 stars 0 forks source link

Fail to mock class that directly extends java.lang.Object #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The new constructor suppression algorithm doesn't work for classes that
directly extend from java.lang.Object since Object doesn't contain a ctor
with with argument IndicateReloadClass. We must change the implementation
in the MainMockTransformers' edit(ConstructorCall c) method to check if the
super class is of type Object before defering the call.

Original issue reported on code.google.com by johan.ha...@gmail.com on 24 Oct 2008 at 1:05

GoogleCodeExporter commented 8 years ago
Fixed a serious bug that caused classes extending to java.lang.Object to be 
non-mockable.

Original comment by johan.ha...@gmail.com on 26 Oct 2008 at 9:31