findConstructorOrThrowException in Whitebox have two critical bugs which
effects other parts of PowerMock (for example createPartialMock).
1:
if (!paramTypes[i].equals(arguments[i].getClass())) {
wrappedConstructorFound = false;
break;
}
Solution: arguments[i].getClass() must be changed to
getUnmockedType(arguments[i].getClass())
2:
The findPrimitiveMethodOrConstructor should be renamed to
hasWrapperArguments(return value must change from true to false)
If a primitive constructor is found parameter checking must take place!!!
This doesn't happen today!!
Original issue reported on code.google.com by johan.ha...@gmail.com on 24 Oct 2008 at 9:36
Original issue reported on code.google.com by
johan.ha...@gmail.com
on 24 Oct 2008 at 9:36