podam
podam copied to clipboard
ManufaturePOJO to String class on Java8
Hi, If you run this code with java8, the manufature will gather the String constructor(String(byte[] bytes, int offset, int length), so when generating radom int you will get outOfBounds.
import org.junit.Test;
import uk.co.jemos.podam.api.PodamFactory;
import uk.co.jemos.podam.api.PodamFactoryImpl;
public class PodamProof {
@Test
public void testStringJava8(){
PodamFactory factory = new PodamFactoryImpl();
String pojo = factory.manufacturePojo(String.class);
System.out.print(pojo);
}
}
Kind Regards
There is already a test for this and it doesn't fail.
I have to admit that this plain String instantiation is not working in 6.0.3.RELEASE
Fixed in 6.0.4-SNAPSHOT