Version of JMockit that was used:
1.28 1.27 1.26 1.25
Java "1.8.0_102"
Description of the problem or enhancement request:
"java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.GenericArrayTypeImpl cannot be cast to java.lang.Class" when MockUp<GENERIC_AS_SUPER>.
That's a regression because 1.24 works perfectly.
public class GENERIC_AS_SUPER extends SUPER<GENERIC>
{...}
public class TEST extends Assert
{
Thanks to Rogério for trying to reproduce. A SUPER<GENERIC> example is HashMap<Object,Collection<Object>[][]>. In order to simplify regression reproducing & any fix verification, here's a simplified Test Case and could you remove "could not reproduce" tag please:
public class Regression {
@Test // jUnit 4.12
public void works1_24() {
new MockUp<HashMap<Object,Collection<Object>[][]>>(){};
}
}
Please provide the following information:
1.28 1.27 1.26 1.25
Java "1.8.0_102"
"java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.GenericArrayTypeImpl cannot be cast to java.lang.Class" when
MockUp<GENERIC_AS_SUPER>
.That's a regression because 1.24 works perfectly.
public class GENERIC_AS_SUPER extends
SUPER<GENERIC>
{...}
public class TEST extends Assert
{
}
The text was updated successfully, but these errors were encountered: