sngular/pact-annotation-processor

Error generating Lists

tfdsimoes opened this issue · 0 comments

Giving the code

@PactDslBodyBuilder
public class DemoClass {

    private List<String> listString1;

    @Example("123")
    private List<String> listString2;

    private List<Long> listLong1;

    @Example("123")
    private List<Long> listLong2;

    private List<Integer> listInteger1;

    @Example("123")
    private List<Integer> listInteger2;

    private List<Float> listFloat1;

    @Example("123")
    private List<Float> listFloat2;

    private List<BigDecimal> listBigDecimal1;

    @Example("123")
    private List<BigDecimal> listBigDecimal2;

    private List<BigInteger> listBigInteger1;

    @Example("[123,123,123]")
    private List<BigInteger> listBigInteger2;

}

Give error initializing the variables

java.util.List<java.lang.String> listString1 = List.of("w9M");


        java.util.List<java.lang.String> listString2 = List.of("oHA8gsFQ");


        java.util.List<java.lang.Long> listLong1 = List.of(6112185605843085999);


        java.util.List<java.lang.Long> listLong2 = List.of(5304697305579390426);


        java.util.List<java.lang.Integer> listInteger1 = List.of(1631745136);


        java.util.List<java.lang.Integer> listInteger2 = List.of(1937626165);


        java.util.List<java.lang.Float> listFloat1 = List.of(5.127670439855929E307);


        java.util.List<java.lang.Float> listFloat2 = List.of(1.163853672731067E308);


        java.util.List<java.math.BigDecimal> listBigDecimal1 = List.of(1.6478729721549756E308);


        java.util.List<java.math.BigDecimal> listBigDecimal2 = List.of(3.089379336326123E307);


        java.util.List<java.math.BigInteger> listBigInteger1 = List.of(422694843);


        java.util.List<java.math.BigInteger> listBigInteger2 = List.of(208986387);

Most of the problem is related to the generation of list, since List.of cast wrong